-
Notifications
You must be signed in to change notification settings - Fork 0
The TimeUtil class lets you do the basic time math like adding, subtracting days, months hours, etc to a reference time.
hemantborole/Time-Machine
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
=begin This class has basic time functions that let you add/subtract time from a reference time. Usage: 1. time_math( operation, ref = Time.now, seconds = 0, minutes = 0, hours = 0, days = 0, months = 0, years = 0 ) 2. leap?( year ): Check if the year is leap 3. time_diff( ref1, ref2 = Time.now ): Return a hash of days, hours, minutes, seconds and usec 4. timed_out?(ttl): Use as a timer. First call sets the timer, and then ttl is checked on every subsequent calls. =end
About
The TimeUtil class lets you do the basic time math like adding, subtracting days, months hours, etc to a reference time.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published