The OpenD Programming Language

toISOString

Converts this Date to a string with the format YYYYMMDD. If writer is set, the resulting string will be written directly to it.

  1. string toISOString()
  2. void toISOString(W w)
    @safe pure @nogc const scope
    void
    toISOString
    (
    W
    )
    (
    scope ref W w
    )
    if (
    isOutputRange!(W, char)
    )

Return Value

Type: void

A string when not using an output range; void otherwise.

Examples

assert(Date.init.toISOString == "null");
assert(Date(2010, 7, 4).toISOString == "20100704");
assert(Date(1998, 12, 25).toISOString == "19981225");
assert(Date(0, 1, 5).toISOString == "00000105");
assert(Date(-4, 1, 5).toISOString == "-00040105", Date(-4, 1, 5).toISOString());

Meta