Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LocalizedTimeUnit

This interface extends from BaseTimeUnit with the only difference being that it enforces its readable name to be not-optional, in order to better characterize a parsed time unit object.

deprecated

Since v1.1.0 - Unnecessary interface (will be removed in v2).

Hierarchy

Index

Properties

Optional customPlural

customPlural: string | NumericWriter

Defines a custom pluralized name for the time unit; it can be a string — used whenever the quantity of time is greater than one — or a function, able to retrieve different words according to a given quantity.

By default, words are pluralized by adding an "s" to the end of their readable name.

Optional pluralize

pluralize: undefined | false | true

Determines whether the time unit should be pluralized: by default, words are pluralized by adding an "s" to the end of their readable name, but this can be changed via customPlural.

If set to false, this will prevent the time unit from ever being pluralized (unless this configuration is overwritten).

Readonly readableName

readableName: string

This version of the property is not optional.

Optional symbol

symbol: undefined | string

A symbol representing the time unit (e.g. "s" for seconds).

Generated using TypeDoc