TimeLabelFormat

public enum TimeLabelFormat

Indicate a format to use for generating time interval labels.

  • Generates labels using short date and time styles.

    Declaration

    Swift

    case dateTime
  • Generates labels using full date style (and no time value).

    Declaration

    Swift

    case longDate
  • Generates labels using medium date style (and no time value).

    Declaration

    Swift

    case date
  • Generates labels using short date style (and no time value).

    Declaration

    Swift

    case shortDate
  • Generates labels using medium time style (and no date value).

    Declaration

    Swift

    case time
  • Generates labels using short time style (and no date value).

    Declaration

    Swift

    case shortTime
  • day

    Generates labels using d format string (1-31 days).

    Declaration

    Swift

    case day
  • Generates labels using dd format string (01-31 days).

    Declaration

    Swift

    case dayWithLeadingZero
  • Generates labels using d MMMM format string.

    Declaration

    Swift

    case dayMonth
  • Generates labels using d MMMM yyyy format string.

    Declaration

    Swift

    case dayMonthYear
  • Generates labels using D format string (1-366 days).

    Declaration

    Swift

    case dayOfYear
  • Generates labels using DDD format string (001-366 days).

    Declaration

    Swift

    case dayOfYearWithLeadingZeroes
  • Generates labels using EEEE format string.

    Declaration

    Swift

    case dayOfWeek
  • Generates labels using EEEEE format string.

    Declaration

    Swift

    case dayOfWeekShortAbbreviation
  • Generates labels using EEEEEE format string.

    Declaration

    Swift

    case dayOfWeekAbbreviation
  • Generates labels using E format string.

    Declaration

    Swift

    case dayOfWeekLongAbbreviation
  • Generates labels using W format string (1-5 weeks).

    Declaration

    Swift

    case weekOfMonth
  • Generates labels using w format string (1-53 weeks).

    Declaration

    Swift

    case weekOfYear
  • Generates labels using ww format string (01-53 weeks).

    Declaration

    Swift

    case weekOfYearWithLeadingZero
  • Generates labels using MMMM format string.

    Declaration

    Swift

    case month
  • Generates labels using MMMMM format string.

    Declaration

    Swift

    case monthShortAbbreviation
  • Generates labels using MMM format string.

    Declaration

    Swift

    case monthAbbreviation
  • Generates labels using M format string (1-12 months).

    Declaration

    Swift

    case monthNumber
  • Generates labels using MM format string (01-12 months).

    Declaration

    Swift

    case monthNumberWithLeadingZero
  • Generates labels using MMMM yyyy format string.

    Declaration

    Swift

    case monthYear
  • Generates labels using QQQ format string.

    Declaration

    Swift

    case quarter
  • Generates labels using Q format string (1-4 quarters).

    Declaration

    Swift

    case quarterNumber
  • Generates labels using QQQ yyyy format string.

    Declaration

    Swift

    case quarterYear
  • Generates labels using yyyy format string.

    Declaration

    Swift

    case year
  • Generates labels using yy format string (00-99 years).

    Declaration

    Swift

    case yearOfCentury
  • Generates labels using a format string (AM, PM periods).

    Declaration

    Swift

    case periodOfDay
  • Generates labels using H format string (0-23 hours).

    Declaration

    Swift

    case hour
  • Generates labels using HH format string (00-23 hours).

    Declaration

    Swift

    case hourWithLeadingZero
  • Generates labels using h format string (1-12 hours).

    Declaration

    Swift

    case hourOfPeriod
  • Generates labels using hh format string (01-12 hours).

    Declaration

    Swift

    case hourOfPeriodWithLeadingZero
  • Generates labels using m format string.

    Declaration

    Swift

    case minute
  • Generates labels using mm format string.

    Declaration

    Swift

    case minuteWithLeadingZero
  • Generates labels using s format string.

    Declaration

    Swift

    case second
  • Generates labels using ss format string.

    Declaration

    Swift

    case secondWithLeadingZero
  • Generates labels using S format string (1 fractional digit of second value).

    Declaration

    Swift

    case decisecond
  • Generates labels using SS format string (2 fractional digits of second value).

    Declaration

    Swift

    case centisecond
  • Generates labels using SSS format string (3 fractional digits of second value).

    Declaration

    Swift

    case millisecond
  • Generates labels using ss.S format string (1 fractional digit for second value).

    Declaration

    Swift

    case secondWithDecisecond
  • Generates labels using ss.SS format string (2 fractional digits for second value).

    Declaration

    Swift

    case secondWithCentisecond
  • Generates labels using ss.SSS format string (3 fractional digits for second value).

    Declaration

    Swift

    case secondWithMillisecond
  • Generates numbers representing the durations passed since a reference time, using a specific time unit, and optionally considering a schedule for measuring the passing time. The values can be set as well to be zero-based (by default they are one-based) and optionally the negative values may be returned as labels as well (by default negative values are omitted).

    Declaration

    Swift

    case numerically(reference: Time?, unit: TimeUnit?, schedule: ScheduleDefinition?, zeroBased: Bool?, includingNegativeValues: Bool?)
  • Returns a format that would generate numbers representing the durations passed since a reference time, using a specific time unit, and optionally considering a schedule for measuring the passing time. The values can be set as well to be zero-based (by default they would be one-based) and optionally the negative values may be returned as labels as well (by default negative values would be omitted).

    Declaration

    Swift

    public static func numeric(
        since reference: Time, in unit: TimeUnit, schedule: ScheduleDefinition? = nil,
        zeroBased: Bool? = nil, includingNegativeValues: Bool? = nil) -> TimeLabelFormat
  • Generates no labels.

    Declaration

    Swift

    case none