View source code
Display the source code in std/datetime.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Struct std.datetime.TimeOfDay
Represents a time of day with hours, minutes, and seconds. It uses 24 hour
time.
Constructors
Name | Description |
---|---|
this
|
Properties
Name | Type | Description |
---|---|---|
hour
[get]
|
ubyte |
Hours past midnight. |
hour
[set]
|
int |
Hours past midnight. |
max
[get]
|
TimeOfDay |
Returns one second short of midnight.
|
min
[get]
|
TimeOfDay |
Returns midnight. |
minute
[get]
|
ubyte |
Minutes past the hour .
|
minute
[set]
|
int |
Minutes past the hour .
|
second
[get]
|
ubyte |
Seconds past the minute .
|
second
[set]
|
int |
Seconds past the minute .
|
Methods
Name | Description |
---|---|
fromISOExtString
|
Creates a TimeOfDay from a string with the format HH:MM:SS.
Whitespace is stripped from the given string.
|
fromISOString
|
Creates a TimeOfDay from a string with the format HHMMSS.
Whitespace is stripped from the given string.
|
opBinary
|
Gives the result of adding or subtracting a duration from this
TimeOfDay .
|
opBinary
|
Gives the difference between two TimeOfDays. |
opCmp
|
Compares this TimeOfDay with the given TimeOfDay .
|
opOpAssign
|
Gives the result of adding or subtracting a duration from this
TimeOfDay , as well as assigning the result to this
TimeOfDay .
|
roll
|
Adds the given number of units to this TimeOfDay . A negative number
will subtract.
|
toISOExtString
|
Converts this TimeOfDay to a string with the format HH:MM:SS.
|
toISOString
|
Converts this TimeOfDay to a string with the format HHMMSS.
|
toString
|
Converts this TimeOfDay to a string.
|
Authors
Jonathan M Davis and Kato Shoichi