The OpenD Programming Language

toISOExtString

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

  1. string toISOExtString()
    version(!D_BetterC)
    @safe pure @nogc const @safe pure nothrow
    string
    toISOExtString
    ()
  2. void toISOExtString(W w)

Return Value

Type: string

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

Examples

assert(Date.init.toISOExtString == "null");
assert(Date(2010, 7, 4).toISOExtString == "2010-07-04");
assert(Date(1998, 12, 25).toISOExtString == "1998-12-25");
assert(Date(0, 1, 5).toISOExtString == "0000-01-05");
assert(Date(-4, 1, 5).toISOExtString == "-0004-01-05");

Meta