ae.utils.time.types

Some nice "polyfills" for standard std.datetime types.

Members

Aliases

StdTime
alias StdTime = typeof(SysTime.init.stdTime)

typeof(SysTime.stdTime), the numeric type used to store absolute time in D.

stdDur
alias stdDur = hnsecs

Convert from StdTime to Duration.

Functions

absTime
AbsTime absTime(SysTime sysTime)
Undocumented in source. Be warned that the author may not have intended to support it.
absTime
AbsTime absTime(StdTime stdTime)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

empty
bool empty [@property getter]

true when the duration d is zero.

fracSecs
Duration fracSecs [@property getter]

Workaround SysTime.fracSecs only being available in 2.067, and SysTime.fracSec becoming deprecated in the same version.

split
auto split [@property getter]

As above, for Duration.split and Duration.get

stdTime
StdTime stdTime [@property getter]

Like SysTime.stdTime.

Structs

AbsTime
struct AbsTime

An absolute, timezone-less point in time. Like SysTime, but does not carry timezone information. Zero-overhead wrapper around StdTime which attempts to be compatible with std.datetime.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <ae@cy.md>