Creates a new Time instance given an hour and optionally a minute, second, and millisecond. If they have not been specified they default to 0.
The hour.
The minute.
The second.
The millisecond.
The hour between 0 and 23
The millisecond between 0 and 999
The minute between 0 and 59
The second between 0 and 59
The regular expression used to parse a time from a string.
Formats this time into a string.
The format to output.
The formatted time.
Determines whether this time is an exact match for the given time.
The given time to test against.
true
if the time matches this time, otherwise false
.
Determines whether this time has the same hour as the given time.
The given time to test against.
true
if the given hour matches this hour, otherwise false
.
Determines whether this time has the same hour and minute as the given time.
The given time to test against.
true
if the given hour and minute matches, otherwise false
.
Determines whether this time has the same hour, minute, and second as the given time.
The given time to test against.
true
if the given hour, minute, and second matches, otherwise
false
.
Sets the time of this instance to the same time of the given input.
The time to set this to.
true
if this time was set, otherwise false
(invalid input).
A unique identifier for this time. The number returned is in the following format: SSSssmmHH
The number of milliseconds from the start of the day until this time.
An object with hour, minute, second, a millisecond properties if they are non-zero on this time.
The time formatted using the smallest format that completely represents this time.
Returns a new instance given an hour and optionally a minute, second, and millisecond. If they have not been specified they default to 0.
The hour.
The minute.
The second.
The millisecond.
A new instance.
Parses a number and converts it to a Time instance. The number is assumed to be in the Time.toIdentifier format.
The number to parse.
The instance parsed.
Parses a string and converts it to a Time instance. If the string is not
in a valid format null
is returned.
The string to parse.
The instance parsed or null
if it was invalid.
Parses a value and tries to convert it to a Time instance.
The input to parse.
The instance parsed or null
if it was invalid.
Generated using TypeDoc
A class which holds a specific time during in any day.