class · System

TimeFormat

internal class System.TimeFormat : System.Any

Dates and lengths of time as text, and read back.

Kind
class
Namespace
System
Assembly
System.Core
Access
internal, static, abstract
Source file
Time.ant

Inheritance

Base classes
Any TimeFormat

Methods

static method General(value: System.DateTime) -> System.String<u8>
#

static

MM/dd/yyyy HH:mm:ss, written straight into its 19 bytes.

static method RoundTrip(value: System.DateTime) -> System.String<u8>
#

static

yyyy-MM-ddTHH:mm:ss.fffffff and the kind's suffix (the "o" format), straight into its bytes.

static method Date(value: System.DateTime, format: System.String<u8>) -> System.String<u8>
#

static

A date by a standard or custom format.

static method Span(value: System.TimeSpan, format: System.String<u8>) -> System.String<u8>
#

static

A length of time by a format.

static method NotADate(text: System.String<u8>) -> void
#

static

static method ReadSpan(text: System.String<u8>) -> System.TimeSpan?
#

static

A length of time: [-]d, [-][d.]h:mm[:ss[.f…]], [-]d:h:mm:ss[.f…], spaces around.

static method Has(text: System.String<u8>, from: i32, end: i32, unit: u8) -> bool
#

static

Whether unit is in text[from..end).

static method ReadDate(text: System.String<u8>, format: System.String<u8>?, styles: System.DateTimeStyles) -> System.DateTime?
#

static

A date, in format (standard or custom) or, with none, in any of the forms Parse reads.

static method Two(text: System.String<u8>, at: i32) -> i32
#

static

Two digits at at (-1 when they are not).

static method RoundTripRead(text: System.String<u8>, styles: System.DateTimeStyles) -> System.DateTime?
#

static

yyyy-MM-ddTHH:mm:ss.fffffff and nothing, Z, or +hh:mm.

static method Made(found: System.DateFields, styles: System.DateTimeStyles) -> System.DateTime?
#

static

The date the fields make, by the styles.

static method Kinded(ticks: i64, utc: bool, hasOffset: bool, offset: i64, styles: System.DateTimeStyles) -> System.DateTime?
#

static

A date read as ticks on its clock, with a zone or not (utc: Z or GMT; hasOffset: an offset in ticks), by the styles.

static method Number(text: System.String<u8>, at: i32, least: i32, most: i32) -> i64
#

static

Digits at at (at least least, at most most) as a number; -1 when there are too few.

static method DigitCount(text: System.String<u8>, at: i32, most: i32) -> i32
#

static

How many digits follow at (up to most).

static method Name(text: System.String<u8>, at: i32, names: System.String<u8>[], length: i32[]) -> i32
#

static

Which of names (ignoring case) the text at at starts with, longest first: its index, and its length in length[0]; -1 when none.

static method Zone(text: System.String<u8>, at: i32, found: System.DateFields) -> i32
#

static

An offset at at: +hh:mm, +hhmm or +hh (- too), into found; how many units it took (0: none).

static method ReadExact(text: System.String<u8>, format: System.String<u8>, found: System.DateFields) -> bool
#

static

text in exactly a custom pattern.

static method ReadAny(text: System.String<u8>, found: System.DateFields) -> bool
#

static

text in any of the forms Parse reads.

static method Year(value: i32, digits: i32) -> i32
#

static

A year written with digits digits (two: 1950–2049).

Private and internal members (11)

static field dayNames: System.String<u8>[]
#

private static

static field shortDayNames: System.String<u8>[]
#

private static

static field monthNames: System.String<u8>[]
#

private static

static field shortMonthNames: System.String<u8>[]
#

private static

static method BadFormat() -> void
#

private static

static method Put2(b: u8[], at: i32, v: i64) -> void
#

private static

static method Put4(b: u8[], at: i32, v: i64) -> void
#

private static

static method Run(format: System.String<u8>, i: i32) -> i32
#

private static

How many times the unit at i repeats from there.

static method Standard(letter: u8) -> System.String<u8>?
#

private static

The custom pattern a one-letter standard date format stands for (null: not one).

static method ZoneOf(value: System.DateTime) -> i64
#

private static

The offset from UTC a date's z and K write: none for Unspecified (K), 0 for UTC, the zone's for local.

static method Custom(value: System.DateTime, format: System.String<u8>, text: System.TimeText) -> void
#

private static

value by a custom date pattern.

Inherited members (5)

Source

TimeFormat as Larva HIR, decompiled from its Larva HIR.

System.TimeFormat.hir
// Dates and lengths of time as text, and read back.
internal class System.TimeFormat : System.Any
{
    static field dayNames: System.String<u8>[]
    static field shortDayNames: System.String<u8>[]
    static field monthNames: System.String<u8>[]
    static field shortMonthNames: System.String<u8>[]
    static method BadFormat() -> void
    static method Put2(b: u8[], at: i32, v: i64) -> void
    static method Put4(b: u8[], at: i32, v: i64) -> void
    // How many times the unit at `i` repeats from there.
    static method Run(format: System.String<u8>, i: i32) -> i32
    // The custom pattern a one-letter standard date format stands for (null: not one).
    static method Standard(letter: u8) -> System.String<u8>?
    // The offset from UTC a date's `z` and `K` write: none for Unspecified (K), 0 for UTC, the zone's for local.
    static method ZoneOf(value: System.DateTime) -> i64
    // `value` by a custom date pattern.
    static method Custom(value: System.DateTime, format: System.String<u8>, text: System.TimeText) -> void
    // `MM/dd/yyyy HH:mm:ss`, written straight into its 19 bytes.
    static method General(value: System.DateTime) -> System.String<u8>
    // `yyyy-MM-ddTHH:mm:ss.fffffff` and the kind's suffix (the "o" format), straight into its bytes.
    static method RoundTrip(value: System.DateTime) -> System.String<u8>
    // A date by a standard or custom format.
    static method Date(value: System.DateTime, format: System.String<u8>) -> System.String<u8>
    // A length of time by a format.
    static method Span(value: System.TimeSpan, format: System.String<u8>) -> System.String<u8>
    static method NotADate(text: System.String<u8>) -> void
    // A length of time: `[-]d`, `[-][d.]h:mm[:ss[.f…]]`, `[-]d:h:mm:ss[.f…]`, spaces around.
    static method ReadSpan(text: System.String<u8>) -> System.TimeSpan?
    // Whether `unit` is in text[from..end).
    static method Has(text: System.String<u8>, from: i32, end: i32, unit: u8) -> bool
    // A date, in `format` (standard or custom) or, with none, in any of the forms Parse reads.
    static method ReadDate(text: System.String<u8>, format: System.String<u8>?, styles: System.DateTimeStyles) -> System.DateTime?
    // Two digits at `at` (-1 when they are not).
    static method Two(text: System.String<u8>, at: i32) -> i32
    // `yyyy-MM-ddTHH:mm:ss.fffffff` and nothing, Z, or `+hh:mm`.
    static method RoundTripRead(text: System.String<u8>, styles: System.DateTimeStyles) -> System.DateTime?
    // The date the fields make, by the styles.
    static method Made(found: System.DateFields, styles: System.DateTimeStyles) -> System.DateTime?
    // A date read as `ticks` on its clock, with a zone or not (`utc`: Z or GMT; `hasOffset`: an offset in ticks), by
    // the styles.
    static method Kinded(ticks: i64, utc: bool, hasOffset: bool, offset: i64, styles: System.DateTimeStyles) -> System.DateTime?
    // Digits at `at` (at least `least`, at most `most`) as a number; -1 when there are too few.
    static method Number(text: System.String<u8>, at: i32, least: i32, most: i32) -> i64
    // How many digits follow `at` (up to `most`).
    static method DigitCount(text: System.String<u8>, at: i32, most: i32) -> i32
    // Which of `names` (ignoring case) the text at `at` starts with, longest first: its index, and its length in
    // `length[0]`; -1 when none.
    static method Name(text: System.String<u8>, at: i32, names: System.String<u8>[], length: i32[]) -> i32
    // An offset at `at`: `+hh:mm`, `+hhmm` or `+hh` (`-` too), into `found`; how many units it took (0: none).
    static method Zone(text: System.String<u8>, at: i32, found: System.DateFields) -> i32
    // `text` in exactly a custom pattern.
    static method ReadExact(text: System.String<u8>, format: System.String<u8>, found: System.DateFields) -> bool
    // `text` in any of the forms Parse reads.
    static method ReadAny(text: System.String<u8>, found: System.DateFields) -> bool
    // A year written with `digits` digits (two: 1950–2049).
    static method Year(value: i32, digits: i32) -> i32
}
Esc