Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Time

The namespace for date functions.

Index

Functions

Functions

format

  • format(value: string | Date, timeFormat?: string): string
  • Convert a timestring to a date format.

    Parameters

    • value: string | Date

      The date timestring or date object.

    • Optional timeFormat: string

    Returns string

    A formatted date.

formatHuman

  • formatHuman(value: string | Date): string
  • Convert a timestring to a human readable string (e.g. 'two minutes ago').

    Parameters

    • value: string | Date

      The date timestring or date object.

    Returns string

    A formatted date.

Generated using TypeDoc