Hex Core JS
    Preparing search index...

    Function formatDateTime

    • Returns a date time string formatted according to a specified formatting string.

      Parameters

      • dateTime: DateTime

        The date time object to format.

      • format: string = "MMMM Do, YYYY h:mm A"

        The formatting scheme to use. Defaults to "MMMM Do, YYYY h:mm A".

      Returns string

      It is recommended to use a locale-aware formatter like formatDate instead of this. Only use this function under very special circumstances (generally for fixed format, not for human-readability).

      The format used can be found in the day.js documentation, as well as the advanced format strings which don't depend on other plugins, which are documented here.