Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

valorin/timeparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TimeParser

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");

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published