Provides methods for formatting date and time objects.

interface DateTime {
    FormatDateTime(dateTimeObj: object): string;
}

Methods

  • Formats a date and time object into a storefront-friendly string. Converts UTC time to the storefront's local time before formatting.

    Parameters

    • dateTimeObj: object

      The date and time object to format.

    Returns string

    A formatted date and time string. Returns an empty string if the input is null.