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

  • LongDate: (time: ConfigType) => string

    12 Hour Clock: November 28, 2018

    24 Hour Clock: 28 November 2018

  • LongDateTime: (time: ConfigType) => string

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

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

  • LongTime: (time: ConfigType) => string

    12 Hour Clock: 9:01:00 AM

    24 Hour Clock: 09:01:00

  • RelativeTime: (time: ConfigType) => string

    The Discord relative time updates every second.

    12 Hour Clock: 3 years ago

    24 Hour Clock: 3 years ago

  • ShortDate: (time: ConfigType) => string

    12 Hour Clock: 11/28/2018

    24 Hour Clock: 28/11/2018

  • ShortDateTime: (time: ConfigType) => string

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

    24 Hour Clock: 28 November 2018 09:01

  • ShortTime: (time: ConfigType) => string

    12 Hour Clock: 9:01 AM

    24 Hour Clock: 09:01

  • 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