Skip to content

A PHP flexible date formatter for passing in a date and/or time and returning a formatted date and/or time with options for calculating past/future dates/times

License

Notifications You must be signed in to change notification settings

dglangley/DLDateFormatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

DLDateFormatter

A PHP flexible date formatter for passing in a date and/or time and returning a formatted date and/or time with options for calculating past/future dates/times

This simple function will accept a date as the first parameter in any standard US format (mm/dd/yy, mm/dd/yyyy, mm-dd-yy, mm-dd-yyyy, yyyy-mm-dd, yy-mm-dd), with optional time in standard US format (hh:ii:ss).

The second parameter is the desired format for the function to output the date/time. This parameter follows the format of the PHP date() function. Optional, and if none specified, returns in n/j/y format.

The third parameter accepts inputs in array format, and calculates the date/time back or forward based on the elements passed in through the array. The values accepted also follow the format of the PHP date() function, with any combination of these five accepted options: h, i, m, d, y. Optional.

About

A PHP flexible date formatter for passing in a date and/or time and returning a formatted date and/or time with options for calculating past/future dates/times

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published