Class DateTimeOffset

Hierarchy

Index

Constructors

constructor

  • new DateTimeOffset(param1: Date | number, month?: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): DateTimeOffset
  • Parameters

    • param1: Date | number
    • Optional month: number
    • Optional day: number
    • Optional hour: number
    • Optional minute: number
    • Optional second: number
    • Optional millisecond: number

    Returns DateTimeOffset

Properties

dateTimeOffset

dateTimeOffset: string = ""

Static maxValue

maxValue: DateTime = new DateTime(DateTime.maxTicks)

Static minValue

minValue: DateTime = new DateTime(DateTime.minTicks)

Accessors

date

dateTime

day

  • get day(): number

dayName

  • get dayName(): string

dayOfWeek

dayOfYear

  • get dayOfYear(): number

dayShortName

  • get dayShortName(): string

hour

  • get hour(): number

jsDate

  • get jsDate(): Date

millisecond

  • get millisecond(): number

minute

  • get minute(): number

month

  • get month(): number

monthGenitiveName

  • get monthGenitiveName(): string

monthName

  • get monthName(): string

monthShortName

  • get monthShortName(): string

second

  • get second(): number

ticks

  • get ticks(): number

timeOfDay

year

  • get year(): number

Static now

Static today

Methods

addDays

addHours

addMilliseconds

  • addMilliseconds(value: number): DateTime

addMinutes

addMonths

addSeconds

addTicks

addYears

compareTo

equals

firstDayOfFirthQuarter

firstDayOfFourthQuarter

firstDayOfMonth

firstDayOfQuarter

firstDayOfSecondQuarter

firstDayOfThirdQuarter

firstDayOfWeek

firstDayOfYear

getHashCode

  • getHashCode(): number

lastDateTimeOfDay

lastDayOfFirthQuarter

lastDayOfFourthQuarter

lastDayOfMonth

lastDayOfQuarter

lastDayOfSecondQuarter

lastDayOfThirdQuarter

lastDayOfWeek

lastDayOfYear

negate

subtract

toNetJsonString

  • toNetJsonString(): string

toOADate

  • toOADate(): number

toOADate2

  • toOADate2(round: boolean): number

toShortDateString

  • toShortDateString(): string

toShortTimeString

  • toShortTimeString(): string

toString

  • toString(format?: string): string
  • By default date and time is converted into American format.

    Parameters

    • Default value format: string = "G"

    Returns string

Static compare

Static dateToNetTicks

  • dateToNetTicks(date: Date): number

Static daysInMonth

  • daysInMonth(year: number, month: number): number
  • The month number ranging from 1 to 12. JS calculate month from 0. This will even work for December.

    Parameters

    • year: number
    • month: number

    Returns number

Static fromNetJsonString

  • fromNetJsonString(jsonDate: string): DateTime

Static fromOADate

Static fromString

Static fromString2

  • fromString2(format?: string, value: string, logError?: boolean): DateTime
  • Parameters

    • Default value format: string = "2015-12-31"
    • value: string
    • Default value logError: boolean = true

    Returns DateTime

Static getNetTypeName

  • getNetTypeName(): string

Static isISO8601String

  • isISO8601String(d: string): boolean

Static isLeapYear

  • isLeapYear(year: number): boolean

Static oaDateToTicks0

  • oaDateToTicks0(oaDate: number): number

Static parse

Static ticksNetToTicksJs

  • ticksNetToTicksJs(ticks: number): number

Static ticksToOADate0

  • ticksToOADate0(ticks: number): number

Static tryParse

  • tryParse(d?: string): object
  • Parameters

    • Default value d: string = "2015-12-31"

    Returns object

    • result: DateTime
    • successfully: boolean

Static tryParseExact

  • tryParseExact(d?: string, format: string[]): object
  • Parameters

    • Default value d: string = "2015-12-31"
    • format: string[]

    Returns object

    • result: DateTime
    • successfully: boolean

Generated using TypeDoc