Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api-helper/misc/dateFormat"

Index

Functions

Functions

formatDate

  • formatDate(date?: Date, format?: string, utc?: boolean): string
  • Format the date with provided format. Defaults to formatting the current UTC date with 'yyyymmddHHMMss' format.

    Parameters

    • Default value date: Date = new Date()

      Date object to format

    • Default value format: string = "yyyymmddHHMMss"

      dateformat compatible format

    • Default value utc: boolean = true

      if true, use UTC time, otherwise use local time zone

    Returns string

    properly formatted date string

Generated using TypeDoc