kameloso.time

Various functions that deal with Durations.

Members

Classes

DurationStringException
class DurationStringException

A normal Exception but where its type conveys the specific context of a call to abbreviatedDuration having malformed arguments.

Functions

abbreviatedDuration
auto abbreviatedDuration(string line)

Constructs a Duration from a string, assumed to be in a *d*h*m*s pattern.

nextMidnight
auto nextMidnight(SysTime now)

Returns a SysTime of the following midnight.

timeSince
string timeSince(Duration duration, Flag!"abbreviate" abbreviate, Flag!"roundUp" roundUp)

Express how much time has passed in a Duration, in natural (English) language. Overload that returns the result as a new string.

timeSinceInto
void timeSinceInto(Duration signedDuration, Sink sink, Flag!"abbreviate" abbreviate, Flag!"roundUp" roundUp)

Express how much time has passed in a Duration, in natural (English) language. Overload that writes the result to the passed output range sink.

Meta