Function formatTimestampDynamic

  • Formats a timestamp to a dynamic string based on its proximity to the current date.

    Parameters

    • timestamp: RawDate

      The timestamp to format

    Returns string

    A string representing the formatted timestamp based on its proximity to the current date

    Example

    formatTimestampDynamic(new Date());
    // => '12:00 am'

    formatTimestampDynamic('2022-01-01T12:00:00Z');
    // => '01/01/2022'

Generated using TypeDoc