bTime

by Blastcore
Useful Time Functions Library.
ID:1151079
 
bTime is an useful library to manage times, comparing them, calculate the difference in seconds, minutes or hours between them, get the time fully in seconds, minutes or hours. Check if a time is earlier or later than other time.
You can look about functions in About/Functions.dm there all functions will be explained.

Functions:

IsTimeValid(): Returns 1 if the time is valid. Seconds and Minutes are between 0 and 59 and Hour is between 0 and 23. Else returns 0.
SetTime(Seconds, Minutes, Hours): Sets the time to the specified values.
Seconds(): Returns the amount of seconds. Returns -1 if the time isn't valid.
Minutes(): Returns the amount of minutes. Returns -1 if the time isn't valid.
Hours(): Returns the amount of hours. Returns -1 if the time isn't valid.
AddSeconds(SecondsToAdd): Adds the amount of seconds specified in the parameters.
AddMinutes(MinutesToAdd): Adds the amount of minutes specified in the parameters.
AddHours(HoursToAdd): Adds the amount of hours specified in the parameters.
SecondsTo(bTime): Returns the amount of seconds until the bTime specified in the parameters.
MinutesTo(bTime): Returns the amount of minutes until the bTime specified in the parameters.
HoursTo(bTime): Returns the amount of hours until the bTime specified in the parameters.
InSeconds(): Returns the full time in seconds only. Everything is rounded.
InMinutes(): Returns the full time in minutes only. Everything is rounded.
InHours(): Returns the full time in hours only. Everything is rounded.
FromString(DateString): Sets the time according to the String. The format is hh:mm:ss.
ToString(TimeStamp): Returns the time with the specified timestamp on the parameter.
IsEqual(bTime): Returns 1 if the time is equal to the bTime. Otherwise returns 0.
IsDifferent(bTime): Returns 1 if the time is different to the bTime. Otherwise returns 0.
IsEarlier(bTime): Returns 1 if the time is earlier than the bTime. Otherwise returns 0.
IsLater(bTime): Returns 1 if the time is later than the bTime. Otherwise returns 0.