ae.utils.time

Time string formatting and such.

Members

Aliases

format
deprecated alias format = formatTime
Undocumented in source.

Functions

formatTime
string formatTime(SysTime t)

Format a SysTime using the format spec fmt. This version generates specialized code for the given fmt.

formatTime
string formatTime(SysTime t, string fmt)
deprecated string formatTime(string fmt, SysTime t)

Format a SysTime using the format spec fmt. This version parses fmt at runtime.

parseTime
SysTime parseTime(C[] t)

Parse the given string into a SysTime, using the format spec fmt. This version generates specialized code for the given fmt.

parseTime
deprecated SysTime parseTime(const(char)[] fmt, C[] t)
Undocumented in source. Be warned that the author may not have intended to support it.
parseTimeUsing
SysTime parseTimeUsing(C[] t, char[] fmt)

Parse the given string into a SysTime, using the format spec fmt. This version parses fmt at runtime.

putTime
void putTime(S sink, SysTime t)

Format a SysTime using the format spec fmt. This version generates specialized code for the given fmt.

putTime
void putTime(S sink, SysTime t, string fmt)
deprecated void putTime(S sink, string fmt, SysTime t)

Format a SysTime using the format spec fmt. This version parses fmt at runtime.

putTimeImpl
void putTimeImpl(S sink, SysTime t)
Undocumented in source. Be warned that the author may not have intended to support it.
timeFormatSize
size_t timeFormatSize(string fmt)

Calculate the maximum amount of characters needed to store a time in this format. Can be evaluated at compile-time.

Manifest constants

MaxTimezoneNameLength
enum MaxTimezoneNameLength;

We assume that no timezone will have a name longer than this. If one does, it is truncated to this length.

Properties

empty
bool empty [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
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

Structs

TimeFormats
struct TimeFormats
Undocumented in source.

Variables

MonthLongNames
auto MonthLongNames;
Undocumented in source.
MonthShortNames
auto MonthShortNames;
Undocumented in source.
WeekdayLongNames
auto WeekdayLongNames;
Undocumented in source.
WeekdayShortNames
auto WeekdayShortNames;
Undocumented in source.

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 <vladimir@thecybershadow.net>