Options
All
  • Public
  • Public/Protected
  • All
Menu

Module DateExt

Index

Functions

UTC

  • UTC(date?: string | number): Date
  • parse data string to UTC date

    Parameters

    • Default value date: string | number = undefined

    Returns Date

add

  • add(d: Date, n: Day): Date
  • Parameters

    • d: Date
    • n: Day

    Returns Date

addPeriod

  • addPeriod(d: Date, p: Period): Date
  • Parameters

    Returns Date

adda

  • adda(d: Date, n: Day): Date
  • Parameters

    • d: Date
    • n: Day

    Returns Date

advance

  • return new date, does not modify input date

    Parameters

    Returns Date

checkSerialNumber

  • checkSerialNumber(serialNumber: number): void
  • Parameters

    • serialNumber: number

    Returns void

dateTime

  • dateTime(d: Date): number
  • Parameters

    • d: Date

    Returns number

day

  • day(d: Date): Day
  • Parameters

    • d: Date

    Returns Day

dayOfMonth

  • dayOfMonth(d: Date): number
  • Parameters

    • d: Date

    Returns number

dayOfYear

  • dayOfYear(d: Date): Day

daysBetween

  • daysBetween(d1: Date, d2: Date): number
  • days between 2 date

    Parameters

    • d1: Date

      Date

    • d2: Date

      Date

    Returns number

    Integer

    should have not allowed to pass null to date value need to use QL_NULL_DATE instead

endOfMonth

  • endOfMonth(d: Date): Date
  • Parameters

    • d: Date

    Returns Date

equal

  • equal(d1: Date, d2: Date): boolean
  • Parameters

    • d1: Date
    • d2: Date

    Returns boolean

fractionOfDay

  • fractionOfDay(d: Date): number
  • Parameters

    • d: Date

    Returns number

fractionOfSecond

  • fractionOfSecond(d: Date): number
  • Parameters

    • d: Date

    Returns number

fromDate

  • fromDate(d: Date): Date
  • Parameters

    • d: Date

    Returns Date

fromSerial

  • fromSerial(serial: number): Date

fromString

  • fromString(s: string): Date
  • Parameters

    • s: string

    Returns Date

hours

  • hours(d: Date): Hour
  • Parameters

    • d: Date

    Returns Hour

isEndOfMonth

  • isEndOfMonth(d: Date): boolean
  • Parameters

    • d: Date

    Returns boolean

isLeap

  • isLeap(y: Year): boolean
  • Parameters

    Returns boolean

localDateTime

  • localDateTime(): Date
  • Returns Date

max

  • max(d1: Date, d2: Date): Date
  • Parameters

    • d1: Date
    • d2: Date

    Returns Date

maxDate

  • maxDate(): Date
  • Returns Date

maximumSerialNumber

  • maximumSerialNumber(): number
  • Returns number

milliseconds

  • Parameters

    • d: Date

    Returns Millisecond

min

  • min(d1: Date, d2: Date): Date
  • Parameters

    • d1: Date
    • d2: Date

    Returns Date

minDate

  • minDate(): Date
  • Returns Date

minimumSerialNumber

  • minimumSerialNumber(): number
  • Returns number

minutes

  • Parameters

    • d: Date

    Returns Minute

month

  • Parameters

    • d: Date

    Returns Month

monthLength

  • monthLength(m: Month, leapYear: boolean): Size
  • Parameters

    • m: Month
    • leapYear: boolean

    Returns Size

monthOffset

  • monthOffset(m: Month, leapYear: boolean): Size
  • Parameters

    • m: Month
    • leapYear: boolean

    Returns Size

nextWeekday

  • nextWeekday(d: Date, dayOfWeek: number): Date
  • Parameters

    • d: Date
    • dayOfWeek: number

    Returns Date

nthWeekday

  • nthWeekday(nth: number, dayOfWeek: number, m: Month, y: Year): Date
  • Parameters

    • nth: number
    • dayOfWeek: number
    • m: Month
    • y: Year

    Returns Date

seconds

  • Parameters

    • d: Date

    Returns Second

serialNumber

  • serialNumber(d: Date): number
  • Parameters

    • d: Date

    Returns number

sub

  • sub(d: Date, n: Day): Date
  • Parameters

    • d: Date
    • n: Day

    Returns Date

subPeriod

  • subPeriod(d: Date, p: Period): Date
  • Parameters

    Returns Date

suba

  • suba(d: Date, n: Day): Date
  • Parameters

    • d: Date
    • n: Day

    Returns Date

ticksPerSecond

  • ticksPerSecond(): number
  • Returns number

time

  • Returns Time

todaysDate

  • todaysDate(): Date
  • Returns Date

universalDateTime

  • universalDateTime(): Date
  • Returns Date

weekday

  • Parameters

    • d: Date

    Returns Weekday

year

  • year(d: Date): Year
  • Parameters

    • d: Date

    Returns Year

yearOffset

  • Parameters

    Returns Size