MAIDR JavaScript API
    Preparing search index...

    Function unitCount

    • A count of a unit of time, in the reader's language: "1 day", "3 days".

      There is no plural engine, so the count chooses between two messages, the one for a count that reads exactly "1" and the one for any other.

      Parameters

      • count: string

        The count, already formatted

      • unit: DurationUnit

        The unit

      Returns string

      The count with its unit