Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Datetime

Index

Variables

Const dateStringValidator

dateStringValidator: RegExp = /^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/g

Functions

Const getDateStringFromZonedDate

  • getDateStringFromZonedDate(timezoneSimulatedDate: Date, timezone: string): string
  • Function to get a date string for a given zoned date

    Parameters

    • timezoneSimulatedDate: Date
    • timezone: string

    Returns string

    string

Const getDatetimeFormat

  • getDatetimeFormat(format: string, showSeconds?: boolean): string
  • Function to build a datetime format

    Parameters

    • format: string
    • Optional showSeconds: boolean

    Returns string

    string

Const isAMPM

  • isAMPM(format: string): boolean
  • Function to check if the format is AM/PM or not

    Parameters

    • format: string

    Returns boolean

    boolean

Const validateDateTime

  • validateDateTime(dateTime: string): boolean
  • Function to validate the datetime string

    Parameters

    • dateTime: string

    Returns boolean

    boolean

Generated using TypeDoc