Type alias FormatDurationInUnitsOptions

FormatDurationInUnitsOptions: {
    delimiter?: string;
    fallBackDuration?: string;
    numberOfUnits?: number;
    throwIfEndDateLowerThanStartDate?: boolean;
}

Defines the options for formatting a duration in units.

Type declaration

  • Optional delimiter?: string

    The delimiter to use between each unit. Defaults to a space.

  • Optional fallBackDuration?: string

    The fallback duration to use if the duration is zero. Defaults to "0 days".

  • Optional numberOfUnits?: number

    The number of units to format the duration in. Defaults to 6.

  • Optional throwIfEndDateLowerThanStartDate?: boolean

    If true, an error will be thrown if the end date is lower than the start date. Defaults to false.

Generated using TypeDoc