Skip to content

Constants representing various time intervals in seconds. Instead of doing crazy math.

Notifications You must be signed in to change notification settings

JamieChung/php-time-constants

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

PHP Time Constants

A helpful collection of time constants with their values in seconds. It saves time when developing an application and having to do the time conversions using math by hand. #firstworldpains

Feel free to use code, just please contribute your changes back to me.

Usage

T_{value of time}_{unit of time}

Example: 5 minutes in seconds

echo T_5_SECONDS;

Example: 1 month in seconds

echo T_1_MONTH;

Example: 2 weeks in seconds

echo T_2_WEEKS;

About

Constants representing various time intervals in seconds. Instead of doing crazy math.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published