Time Methods

The methods defined in the Time primitive type are summarized in the following table.

Method Description
currentLocaleFormat Returns a string containing the time in the format of the current locale
display Returns a string representing the value of the receiver
format Returns a string containing the time in the specified format
hour Returns the hour part of the receiver in 24-hour clock form
isValid Returns true if the receiver contains a valid time
milliSecond Returns the millisecond part of the receiver
minute Returns the minute part of the receiver
parseWithCurrentLocale Sets the receiver to the result of parsing a string representing a time for the current locale
parseWithFmtAndLcid Sets the receiver to the result of parsing a string representing a time for the specified format and the specified locale
parseWithPicAndLcid Sets the receiver to the result of parsing a string representing a time for the specified time picture and the specified locale
second Returns the second part of the receiver
setByteOrderLocal Returns a time that has the bytes ordered as required by the local node
setByteOrderRemote Returns a time that has the bytes ordered as required by the specified remote node
setTime Sets the value of the receiver to a specified time in 24-hour clock form
setTimeStrict Sets the value of the receiver to a specified time and checks that the individual time values are within range
subtract Returns the interval between the receiver and the specified time
userFormat Returns a string containing the receiver in the supplied time format
userFormatAndLcid Returns a string containing the receiver in the specified time format for the specified locale
userFormatPicAndLcid Returns a string containing the receiver in the specified time picture for the specified locale