Function monthNameDa

  • Returns the name, in Danish language, of the month corresponding to the provided month number.

    Parameters

    • month: number

      A month number between 1 and 12.

    • Optional maxLength: number

      The maximum length of the returned string. If not provided, the full name is returned.

    Returns string

    Throws

    if the provided month number is not a valid month.

    Example

    monthNameDA(9) //=> 'September'
    monthNameDA(9, 3) //=> 'Sep'
    monthNameDA(9, 4) //=> 'Sept'
    monthNameDA(5, 4) //=> 'Maj' // The full name is not long enough to be shortened.

Generated using TypeDoc