valorin/timeparser

This package is abandoned and no longer maintained. No replacement package was suggested.

Simple PHP class for parsing time values entered by users in a wide range of formats.

v1.0.1 2014-10-18 03:56 UTC

This package is auto-updated.

Last update: 2021-02-08 19:40:18 UTC


README

Simple PHP class for parsing time values entered by users in a wide range of formats.

Installation

Install with composer:

composer require valorin/timeparser

Usage

Add a use namespace declaration to your class:

use Valorin\TimeParser\TimeParser;

Set the required output format, and run the ::parse() function:

TimeParser::setFormat(TimeParser::FORMAT24);
$time = TimeParser::parse("09:32 am");