Variable TimeFormatConst

TimeFormat: {
    Default: ((time: ConfigType) => string);
    LongDate: ((time: ConfigType) => string);
    LongDateTime: ((time: ConfigType) => string);
    LongTime: ((time: ConfigType) => string);
    RelativeTime: ((time: ConfigType) => string);
    ShortDate: ((time: ConfigType) => string);
    ShortDateTime: ((time: ConfigType) => string);
    ShortTime: ((time: ConfigType) => string);
    StaticRelativeTime: ((time: ConfigType, withoutSuffix?: boolean) => string);
} = ...

TimeFormat

Format time to various discord time format.

Type declaration

  • Default: ((time: ConfigType) => string)

    12 Hour Clock: November 28, 2018 9:01 AM

    24 Hour Clock: 28 November 2018 09:01

      • (time): string
      • Parameters

        • time: ConfigType

        Returns string

  • LongDate: ((time: ConfigType) => string)

    12 Hour Clock: November 28, 2018

    24 Hour Clock: 28 November 2018

      • (time): string
      • Parameters

        • time: ConfigType

        Returns string

  • LongDateTime: ((time: ConfigType) => string)

    12 Hour Clock: Wednesday, November 28, 2018 9:01 AM

    24 Hour Clock: Wednesday, 28 November 2018 09:01

      • (time): string
      • Parameters

        • time: ConfigType

        Returns string

  • LongTime: ((time: ConfigType) => string)

    12 Hour Clock: 9:01:00 AM

    24 Hour Clock: 09:01:00

      • (time): string
      • Parameters

        • time: ConfigType

        Returns string

  • RelativeTime: ((time: ConfigType) => string)

    The Discord relative time updates every second.

    12 Hour Clock: 3 years ago

    24 Hour Clock: 3 years ago

      • (time): string
      • Parameters

        • time: ConfigType

        Returns string

  • ShortDate: ((time: ConfigType) => string)

    12 Hour Clock: 11/28/2018

    24 Hour Clock: 28/11/2018

      • (time): string
      • Parameters

        • time: ConfigType

        Returns string

  • ShortDateTime: ((time: ConfigType) => string)

    12 Hour Clock: November 28, 2018 9:01 AM

    24 Hour Clock: 28 November 2018 09:01

      • (time): string
      • Parameters

        • time: ConfigType

        Returns string

  • ShortTime: ((time: ConfigType) => string)

    12 Hour Clock: 9:01 AM

    24 Hour Clock: 09:01

      • (time): string
      • Parameters

        • time: ConfigType

        Returns string

  • StaticRelativeTime: ((time: ConfigType, withoutSuffix?: boolean) => string)

    Unlike Discord relative time which updates every second, this remain static.

    12 Hour Clock: 3 years ago

    24 Hour Clock: 3 years ago

      • (time, withoutSuffix?): string
      • Parameters

        • time: ConfigType
        • OptionalwithoutSuffix: boolean

        Returns string