Skip to content

hemantborole/Time-Machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

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

No packages published

Languages