Time
·
25 commits
to main
since this release
Timer
Contains classes for time related functions and objects.
datetimeclass:- Methods:
nowreturns the current date and time as a string along with optional parameter to format itdatetime now : ? @str:formatutcnowreturns the utc date and time as a string along with optional parameter to format itdatetime utcnow : ? @str:formattodayreturns today's date and time as a string along with optional parameter to format itdatetime today : ? @str:formatcomparereturns1,0, or-1depending on the dates relation to the other datedatetime compare : @str:time1, @str:time2unixepochreturns the unix epoch date and time as a string along with optional parameter to format itdatetime unixepoch : ? @str:formatmax-valuereturns the max value date and time as a string along with optional parameter to format itdatetime max-value : ? @str:formatmin-valuereturns the min value date and time as a string along with optional parameter to format itdatetime min-value : ? @str:formatdays-in-monthreturns the days in the month as an intdatetime days-int-month : @str:_timeis-leep-yearreturns if the year is a leep yeardatetime is-leep-year : @str:_timeday-of-yearreturns the day of the year as intdatetime day-of-year : @str:_timeday-of-weekreturns the day of the week as strdatetime day-of-week : @str:_timeis-daylight-savings-timereturns if the year is in daylight savings timedatetime is-daylight-savings-time : @str:_time
- Methods:
stopwatchclass:- Methods:
startstarts a stopwatch instance that counts upendends the stopwatch in the instanceelapsed-nanosecondsreturns the elapsed nanoseconds from the stopwatch instanceelapsed-milisecondsreturns the elapsed miliseconds from the stopwatch instanceelapsed-secondsreturns the elapsed seconds from the stopwatch instanceelapsed-minutesreturns the elapsed minutes from the stopwatch instanceelapsed-hoursreturns the elapsed hours from the stopwatch instance
- Methods:
timerclass:- Methods:
new-instancereturns a new instance of the timer class based off of the variable valuesnew-instance : @int:hours, @int:minutes, @int:seconds, @int:milisecondsstartstarts a timer with the values from the instance propertiesstopstops the timer instanceresumeresumes the timer instanceis-donereturns if the timer instance has elapsedis-not-donereturns if the timer instance has not elapsed
- Properties:
hoursthe timer instance's hoursminutesthe timer instance's minutessecondsthe timer instance's secondsmilisecondsthe timer instance's miliseconds
- Methods: