Format

Creates a new format for parsing and formatting UtcOffset values.

Example:

// `GMT` on zero, `+4:30:15`, using a custom format:
UtcOffset.Format {
optional("GMT") {
offsetHours(Padding.NONE); char(':'); offsetMinutesOfHour()
optional { char(':'); offsetSecondsOfMinute() }
}
}

Since UtcOffset values are rarely formatted and parsed on their own, instances of DateTimeFormat obtained here will likely need to be passed to DateTimeFormatBuilder.WithUtcOffset.offset in a format builder for a larger data structure.

There is a collection of predefined formats in UtcOffset.Formats.