DateTime

Overview

DateTime type used to store and work with date/time values.

Location


 

constructor

 

constructor

 

DateTime()

 

init()

 

DateTime()

 

Sub New()

constructor (Int64)

 

constructor(aTicks: Int64)

 

DateTime(Int64 aTicks)

 

init(_ aTicks: Int64)

 

DateTime(Int64 aTicks)

 

Sub New(aTicks As Int64)

Parameters:

  • aTicks:

constructor (Int32, Int32, Int32)

 

constructor(aYear: Int32; aMonth: Int32; aDay: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay)

 

init(_ aYear: Int32, _ aMonth: Int32, _ aDay: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay)

 

Sub New(aYear As Int32, aMonth As Int32, aDay As Int32)

Parameters:

  • aYear:
  • aMonth:
  • aDay:

constructor (Int32, Int32, Int32, Int32, Int32)

 

constructor(aYear: Int32; aMonth: Int32; aDay: Int32; anHour: Int32; aMinute: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute)

 

init(_ aYear: Int32, _ aMonth: Int32, _ aDay: Int32, _ anHour: Int32, _ aMinute: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute)

 

Sub New(aYear As Int32, aMonth As Int32, aDay As Int32, anHour As Int32, aMinute As Int32)

Parameters:

  • aYear:
  • aMonth:
  • aDay:
  • anHour:
  • aMinute:

constructor (Int32, Int32, Int32, Int32, Int32, Int32)

 

constructor(aYear: Int32; aMonth: Int32; aDay: Int32; anHour: Int32; aMinute: Int32; aSecond: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute, Int32 aSecond)

 

init(_ aYear: Int32, _ aMonth: Int32, _ aDay: Int32, _ anHour: Int32, _ aMinute: Int32, _ aSecond: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute, Int32 aSecond)

 

Sub New(aYear As Int32, aMonth As Int32, aDay As Int32, anHour As Int32, aMinute As Int32, aSecond As Int32)

Parameters:

  • aYear:
  • aMonth:
  • aDay:
  • anHour:
  • aMinute:
  • aSecond:

constructor (Int32, Int32, Int32, Int32, Int32, Int32, Int32)

 

constructor(aYear: Int32; aMonth: Int32; aDay: Int32; anHour: Int32; aMinute: Int32; aSecond: Int32; aMillisecond: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute, Int32 aSecond, Int32 aMillisecond)

 

init(_ aYear: Int32, _ aMonth: Int32, _ aDay: Int32, _ anHour: Int32, _ aMinute: Int32, _ aSecond: Int32, _ aMillisecond: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute, Int32 aSecond, Int32 aMillisecond)

 

Sub New(aYear As Int32, aMonth As Int32, aDay As Int32, anHour As Int32, aMinute As Int32, aSecond As Int32, aMillisecond As Int32)

Parameters:

  • aYear:
  • aMonth:
  • aDay:
  • anHour:
  • aMinute:
  • aSecond:
  • aMillisecond:

AddDays

Adds a nr of days and returns a new datetime.

 

method AddDays(Value: Int32): DateTime

 

DateTime AddDays(Int32 Value)

 

func AddDays(_ Value: Int32) -> DateTime

 

DateTime AddDays(Int32 Value)

 

Function AddDays(Value As Int32) As DateTime

Parameters:

  • Value:

AddHours

Adds a nr of hours and returns a new datetime.

 

method AddHours(Value: Int32): DateTime

 

DateTime AddHours(Int32 Value)

 

func AddHours(_ Value: Int32) -> DateTime

 

DateTime AddHours(Int32 Value)

 

Function AddHours(Value As Int32) As DateTime

Parameters:

  • Value:

AddMilliseconds

Adds a nr of msec and returns a new datetime.

 

method AddMilliseconds(Value: Int32): DateTime

 

DateTime AddMilliseconds(Int32 Value)

 

func AddMilliseconds(_ Value: Int32) -> DateTime

 

DateTime AddMilliseconds(Int32 Value)

 

Function AddMilliseconds(Value As Int32) As DateTime

Parameters:

  • Value:

AddMinutes

Adds a nr of minutes and returns a new datetime.

 

method AddMinutes(Value: Int32): DateTime

 

DateTime AddMinutes(Int32 Value)

 

func AddMinutes(_ Value: Int32) -> DateTime

 

DateTime AddMinutes(Int32 Value)

 

Function AddMinutes(Value As Int32) As DateTime

Parameters:

  • Value:

AddMonths

Adds a nr of months and returns a new datetime.

 

method AddMonths(Value: Int32): DateTime

 

DateTime AddMonths(Int32 Value)

 

func AddMonths(_ Value: Int32) -> DateTime

 

DateTime AddMonths(Int32 Value)

 

Function AddMonths(Value As Int32) As DateTime

Parameters:

  • Value:

AddSeconds

Adds a nr of seconds and returns a new datetime.

 

method AddSeconds(Value: Int32): DateTime

 

DateTime AddSeconds(Int32 Value)

 

func AddSeconds(_ Value: Int32) -> DateTime

 

DateTime AddSeconds(Int32 Value)

 

Function AddSeconds(Value As Int32) As DateTime

Parameters:

  • Value:

AddTicks

Adds a nr of ticks and returns a new datetime.

 

method AddTicks(Value: Int64): DateTime

 

DateTime AddTicks(Int64 Value)

 

func AddTicks(_ Value: Int64) -> DateTime

 

DateTime AddTicks(Int64 Value)

 

Function AddTicks(Value As Int64) As DateTime

Parameters:

  • Value:

AddYears

Adds a nr of years and returns a new datetime.

 

method AddYears(Value: Int32): DateTime

 

DateTime AddYears(Int32 Value)

 

func AddYears(_ Value: Int32) -> DateTime

 

DateTime AddYears(Int32 Value)

 

Function AddYears(Value As Int32) As DateTime

Parameters:

  • Value:

CompareTo (Object): Int32

 

method CompareTo(a: Object): Int32

 

Int32 CompareTo(Object a)

 

func CompareTo(_ a: Object) -> Int32

 

Int32 CompareTo(Object a)

 

Function CompareTo(a As Object) As Int32

Parameters:

  • a:

CompareTo (DateTime): Int32

Compares this date, and returns 0 if the same, -1 if less, 1 if more.

 

method CompareTo(Value: DateTime): Int32

 

Int32 CompareTo(DateTime Value)

 

func CompareTo(_ Value: DateTime) -> Int32

 

Int32 CompareTo(DateTime Value)

 

Function CompareTo(Value As DateTime) As Int32

Parameters:

  • Value:

Date

Returns the date without time part.

 

property Date: DateTime read;

 

DateTime Date { get; }

 

var Date: DateTime { get{} }

 

DateTime Date { __get; }

 

ReadOnly Property Date() As DateTime

Day

Returns the day of the month (1..31)

 

property Day: Int32 read;

 

Int32 Day { get; }

 

var Day: Int32 { get{} }

 

Int32 Day { __get; }

 

ReadOnly Property Day() As Int32

DayOfWeek

Returns the day of the week (1..7)

 

property DayOfWeek: Int32 read;

 

Int32 DayOfWeek { get; }

 

var DayOfWeek: Int32 { get{} }

 

Int32 DayOfWeek { __get; }

 

ReadOnly Property DayOfWeek() As Int32

Equals (Object): Boolean  virtual    (declared in Object)

Default constructor.

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther: the reference to compare this with.

Equals (Object): Boolean  override virtual

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

 

Function Equals(obj As Object) As Boolean

Parameters:

  • obj:

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

FromFileTime Windows

Converts a windows filetime to datetime.

 

class method FromFileTime(aFileTime: FILETIME): DateTime

 

static DateTime FromFileTime(FILETIME aFileTime)

 

static func FromFileTime(_ aFileTime: FILETIME) -> DateTime

 

static DateTime FromFileTime(FILETIME aFileTime)

 

Shared Function FromFileTime(aFileTime As FILETIME) As DateTime

Parameters:

  • aFileTime:

FromOleDate

Converts an OLE date (double) to DateTime.

 

class method FromOleDate(aDate: Double): DateTime

 

static DateTime FromOleDate(Double aDate)

 

static func FromOleDate(_ aDate: Double) -> DateTime

 

static DateTime FromOleDate(Double aDate)

 

Shared Function FromOleDate(aDate As Double) As DateTime

Parameters:

  • aDate:

FromSystemTime Windows

Converts a windows system time to Datetime.

 

class method FromSystemTime(aFileTime: SYSTEMTIME): DateTime

 

static DateTime FromSystemTime(SYSTEMTIME aFileTime)

 

static func FromSystemTime(_ aFileTime: SYSTEMTIME) -> DateTime

 

static DateTime FromSystemTime(SYSTEMTIME aFileTime)

 

Shared Function FromSystemTime(aFileTime As SYSTEMTIME) As DateTime

Parameters:

  • aFileTime:

FromUnixTime Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator

Converts a unix timestamp to Datetime.

 

class method FromUnixTime(aStruct: __struct_timespec): DateTime

 

static DateTime FromUnixTime(__struct_timespec aStruct)

 

static func FromUnixTime(_ aStruct: __struct_timespec) -> DateTime

 

static DateTime FromUnixTime(__struct_timespec aStruct)

 

Shared Function FromUnixTime(aStruct As __struct_timespec) As DateTime

Parameters:

  • aStruct:

FromUnixTimeUTC Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator

Converts a unix timestamp to Datetime, presume in UTC.

 

class method FromUnixTimeUTC(aStruct: __struct_timespec): DateTime

 

static DateTime FromUnixTimeUTC(__struct_timespec aStruct)

 

static func FromUnixTimeUTC(_ aStruct: __struct_timespec) -> DateTime

 

static DateTime FromUnixTimeUTC(__struct_timespec aStruct)

 

Shared Function FromUnixTimeUTC(aStruct As __struct_timespec) As DateTime

Parameters:

  • aStruct:

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

Hour

Returns the hour (0..23)

 

property Hour: Int32 read;

 

Int32 Hour { get; }

 

var Hour: Int32 { get{} }

 

Int32 Hour { __get; }

 

ReadOnly Property Hour() As Int32

isLeapYear

Check if the year is a leap year.

 

class method isLeapYear(Value: Int32): Boolean

 

static Boolean isLeapYear(Int32 Value)

 

static func isLeapYear(_ Value: Int32) -> Boolean

 

static Boolean isLeapYear(Int32 Value)

 

Shared Function isLeapYear(Value As Int32) As Boolean

Parameters:

  • Value:

MaxYear

Max year.

 

const MaxYear: Int32 = 10000;

 

const Int32 MaxYear = 10000

 

static let MaxYear: Int32 = 10000

 

static final Int32 MaxYear = 10000

 

Dim MaxYear As Int32 = 10000

Milliseconds

Returns the miliseconds in this datetime.

 

property Milliseconds: Int32 read;

 

Int32 Milliseconds { get; }

 

var Milliseconds: Int32 { get{} }

 

Int32 Milliseconds { __get; }

 

ReadOnly Property Milliseconds() As Int32

Minute

Returns the minutes in this datetime.

 

property Minute: Int32 read;

 

Int32 Minute { get; }

 

var Minute: Int32 { get{} }

 

Int32 Minute { __get; }

 

ReadOnly Property Minute() As Int32

Month

Returns the month in this datetime.

 

property Month: Int32 read;

 

Int32 Month { get; }

 

var Month: Int32 { get{} }

 

Int32 Month { __get; }

 

ReadOnly Property Month() As Int32

Now

Returns the current DateTime.

 

class property Now: DateTime read;

 

class DateTime Now { get; }

 

static var Now: DateTime { get{} }

 

class DateTime Now { __get; }

 

Shared ReadOnly Property Now() As DateTime

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

Second

Returns the seconds in this datetime.

 

property Second: Int32 read;

 

Int32 Second { get; }

 

var Second: Int32 { get{} }

 

Int32 Second { __get; }

 

ReadOnly Property Second() As Int32

Ticks

Returns the datetime as Ticks.

 

property Ticks: Int64 read;

 

Int64 Ticks { get; }

 

var Ticks: Int64 { get{} }

 

Int64 Ticks { __get; }

 

ReadOnly Property Ticks() As Int64

Today

Returns the current date without time part.

 

class property Today: DateTime read;

 

class DateTime Today { get; }

 

static var Today: DateTime { get{} }

 

class DateTime Today { __get; }

 

Shared ReadOnly Property Today() As DateTime

ToLongPrettyDateString

 

method ToLongPrettyDateString(aTimeZone: TimeZone): String

 

String ToLongPrettyDateString(TimeZone aTimeZone)

 

func ToLongPrettyDateString(_ aTimeZone: TimeZone) -> String

 

String ToLongPrettyDateString(TimeZone aTimeZone)

 

Function ToLongPrettyDateString(aTimeZone As TimeZone) As String

Parameters:

  • aTimeZone:

ToOleDate

Convert a datetime to Ole date (double).

 

class method ToOleDate(aDate: DateTime): Double

 

static Double ToOleDate(DateTime aDate)

 

static func ToOleDate(_ aDate: DateTime) -> Double

 

static Double ToOleDate(DateTime aDate)

 

Shared Function ToOleDate(aDate As DateTime) As Double

Parameters:

  • aDate:

ToShortDateString

 

method ToShortDateString(aTimeZone: TimeZone): String

 

String ToShortDateString(TimeZone aTimeZone)

 

func ToShortDateString(_ aTimeZone: TimeZone) -> String

 

String ToShortDateString(TimeZone aTimeZone)

 

Function ToShortDateString(aTimeZone As TimeZone) As String

Parameters:

  • aTimeZone:

ToShortPrettyDateString

 

method ToShortPrettyDateString(aTimeZone: TimeZone): String

 

String ToShortPrettyDateString(TimeZone aTimeZone)

 

func ToShortPrettyDateString(_ aTimeZone: TimeZone) -> String

 

String ToShortPrettyDateString(TimeZone aTimeZone)

 

Function ToShortPrettyDateString(aTimeZone As TimeZone) As String

Parameters:

  • aTimeZone:

ToShortTimeString

 

method ToShortTimeString(aTimeZone: TimeZone): String

 

String ToShortTimeString(TimeZone aTimeZone)

 

func ToShortTimeString(_ aTimeZone: TimeZone) -> String

 

String ToShortTimeString(TimeZone aTimeZone)

 

Function ToShortTimeString(aTimeZone As TimeZone) As String

Parameters:

  • aTimeZone:

ToString  override virtual

Convert this datetime to string.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToString (TimeZone): String

 

method ToString(aTimeZone: TimeZone): String

 

String ToString(TimeZone aTimeZone)

 

func ToString(_ aTimeZone: TimeZone) -> String

 

String ToString(TimeZone aTimeZone)

 

Function ToString(aTimeZone As TimeZone) As String

Parameters:

  • aTimeZone:

ToString (String, Locale, TimeZone): String

 

method ToString(Format: String; aLocale: Locale; aTimeZone: TimeZone): String

 

String ToString(String Format, Locale aLocale, TimeZone aTimeZone)

 

func ToString(_ Format: String, _ aLocale: Locale, _ aTimeZone: TimeZone) -> String

 

String ToString(String Format, Locale aLocale, TimeZone aTimeZone)

 

Function ToString(Format As String, aLocale As Locale, aTimeZone As TimeZone) As String

Parameters:

  • Format:
  • aLocale:
  • aTimeZone:

ToString (String, TimeZone): String

 

method ToString(Format: String; aTimeZone: TimeZone): String

 

String ToString(String Format, TimeZone aTimeZone)

 

func ToString(_ Format: String, _ aTimeZone: TimeZone) -> String

 

String ToString(String Format, TimeZone aTimeZone)

 

Function ToString(Format As String, aTimeZone As TimeZone) As String

Parameters:

  • Format:
  • aTimeZone:

ToString (String, String, TimeZone): String

 

method ToString(Format: String; Culture: String; aTimeZone: TimeZone): String

 

String ToString(String Format, String Culture, TimeZone aTimeZone)

 

func ToString(_ Format: String, _ Culture: String, _ aTimeZone: TimeZone) -> String

 

String ToString(String Format, String Culture, TimeZone aTimeZone)

 

Function ToString(Format As String, Culture As String, aTimeZone As TimeZone) As String

Parameters:

  • Format:
  • Culture:
  • aTimeZone:

ToSystemTime Windows

Convert this value to a System datetime.

 

method ToSystemTime: SYSTEMTIME

 

SYSTEMTIME ToSystemTime()

 

func ToSystemTime() -> SYSTEMTIME

 

SYSTEMTIME ToSystemTime()

 

Function ToSystemTime() As SYSTEMTIME

ToSystemTime (DateTime): SYSTEMTIME Windows

Convert this value to a System datetime.

 

class method ToSystemTime(aDateTime: DateTime): SYSTEMTIME

 

static SYSTEMTIME ToSystemTime(DateTime aDateTime)

 

static func ToSystemTime(_ aDateTime: DateTime) -> SYSTEMTIME

 

static SYSTEMTIME ToSystemTime(DateTime aDateTime)

 

Shared Function ToSystemTime(aDateTime As DateTime) As SYSTEMTIME

Parameters:

  • aDateTime:

TryParse (String, String, Locale, DateParserOptions): nullable DateTime

 

class method TryParse(aDateTime: String; aFormat: String; aLocale: Locale; aOptions: DateParserOptions): nullable DateTime

 

static DateTime? TryParse(String aDateTime, String aFormat, Locale aLocale, DateParserOptions aOptions)

 

static func TryParse(_ aDateTime: String, _ aFormat: String, _ aLocale: Locale, _ aOptions: DateParserOptions) -> DateTime!

 

static DateTime TryParse(String aDateTime, String aFormat, Locale aLocale, DateParserOptions aOptions)

 

Shared Function TryParse(aDateTime As String, aFormat As String, aLocale As Locale, aOptions As DateParserOptions) As DateTime?

Parameters:

  • aDateTime:
  • aFormat:
  • aLocale:
  • aOptions:

TryParse (String, String, DateParserOptions): nullable DateTime

 

class method TryParse(aDateTime: String; aFormat: String; aOptions: DateParserOptions): nullable DateTime

 

static DateTime? TryParse(String aDateTime, String aFormat, DateParserOptions aOptions)

 

static func TryParse(_ aDateTime: String, _ aFormat: String, _ aOptions: DateParserOptions) -> DateTime!

 

static DateTime TryParse(String aDateTime, String aFormat, DateParserOptions aOptions)

 

Shared Function TryParse(aDateTime As String, aFormat As String, aOptions As DateParserOptions) As DateTime?

Parameters:

  • aDateTime:
  • aFormat:
  • aOptions:

TryParse (String, Locale, DateParserOptions): nullable DateTime

 

class method TryParse(aDateTime: String; aLocale: Locale; aOptions: DateParserOptions): nullable DateTime

 

static DateTime? TryParse(String aDateTime, Locale aLocale, DateParserOptions aOptions)

 

static func TryParse(_ aDateTime: String, _ aLocale: Locale, _ aOptions: DateParserOptions) -> DateTime!

 

static DateTime TryParse(String aDateTime, Locale aLocale, DateParserOptions aOptions)

 

Shared Function TryParse(aDateTime As String, aLocale As Locale, aOptions As DateParserOptions) As DateTime?

Parameters:

  • aDateTime:
  • aLocale:
  • aOptions:

TryParse (String, DateParserOptions): nullable DateTime

 

class method TryParse(aDateTime: String; aOptions: DateParserOptions): nullable DateTime

 

static DateTime? TryParse(String aDateTime, DateParserOptions aOptions)

 

static func TryParse(_ aDateTime: String, _ aOptions: DateParserOptions) -> DateTime!

 

static DateTime TryParse(String aDateTime, DateParserOptions aOptions)

 

Shared Function TryParse(aDateTime As String, aOptions As DateParserOptions) As DateTime?

Parameters:

  • aDateTime:
  • aOptions:

TryParseISO8601

 

class method TryParseISO8601(aDateTime: String): nullable DateTime

 

static DateTime? TryParseISO8601(String aDateTime)

 

static func TryParseISO8601(_ aDateTime: String) -> DateTime!

 

static DateTime TryParseISO8601(String aDateTime)

 

Shared Function TryParseISO8601(aDateTime As String) As DateTime?

Parameters:

  • aDateTime:

UtcNow

Returns the current UTC datetime.

 

class property UtcNow: DateTime read;

 

class DateTime UtcNow { get; }

 

static var UtcNow: DateTime { get{} }

 

class DateTime UtcNow { __get; }

 

Shared ReadOnly Property UtcNow() As DateTime

Year

Returns the year in this Datetime.

 

property Year: Int32 read;

 

Int32 Year { get; }

 

var Year: Int32 { get{} }

 

Int32 Year { __get; }

 

ReadOnly Property Year() As Int32

 

MaxYear

Max year.

 

const MaxYear: Int32 = 10000;

 

const Int32 MaxYear = 10000

 

static let MaxYear: Int32 = 10000

 

static final Int32 MaxYear = 10000

 

Dim MaxYear As Int32 = 10000

 

Date

Returns the date without time part.

 

property Date: DateTime read;

 

DateTime Date { get; }

 

var Date: DateTime { get{} }

 

DateTime Date { __get; }

 

ReadOnly Property Date() As DateTime

Day

Returns the day of the month (1..31)

 

property Day: Int32 read;

 

Int32 Day { get; }

 

var Day: Int32 { get{} }

 

Int32 Day { __get; }

 

ReadOnly Property Day() As Int32

DayOfWeek

Returns the day of the week (1..7)

 

property DayOfWeek: Int32 read;

 

Int32 DayOfWeek { get; }

 

var DayOfWeek: Int32 { get{} }

 

Int32 DayOfWeek { __get; }

 

ReadOnly Property DayOfWeek() As Int32

Hour

Returns the hour (0..23)

 

property Hour: Int32 read;

 

Int32 Hour { get; }

 

var Hour: Int32 { get{} }

 

Int32 Hour { __get; }

 

ReadOnly Property Hour() As Int32

Milliseconds

Returns the miliseconds in this datetime.

 

property Milliseconds: Int32 read;

 

Int32 Milliseconds { get; }

 

var Milliseconds: Int32 { get{} }

 

Int32 Milliseconds { __get; }

 

ReadOnly Property Milliseconds() As Int32

Minute

Returns the minutes in this datetime.

 

property Minute: Int32 read;

 

Int32 Minute { get; }

 

var Minute: Int32 { get{} }

 

Int32 Minute { __get; }

 

ReadOnly Property Minute() As Int32

Month

Returns the month in this datetime.

 

property Month: Int32 read;

 

Int32 Month { get; }

 

var Month: Int32 { get{} }

 

Int32 Month { __get; }

 

ReadOnly Property Month() As Int32

Second

Returns the seconds in this datetime.

 

property Second: Int32 read;

 

Int32 Second { get; }

 

var Second: Int32 { get{} }

 

Int32 Second { __get; }

 

ReadOnly Property Second() As Int32

Ticks

Returns the datetime as Ticks.

 

property Ticks: Int64 read;

 

Int64 Ticks { get; }

 

var Ticks: Int64 { get{} }

 

Int64 Ticks { __get; }

 

ReadOnly Property Ticks() As Int64

Year

Returns the year in this Datetime.

 

property Year: Int32 read;

 

Int32 Year { get; }

 

var Year: Int32 { get{} }

 

Int32 Year { __get; }

 

ReadOnly Property Year() As Int32

Now

Returns the current DateTime.

 

class property Now: DateTime read;

 

class DateTime Now { get; }

 

static var Now: DateTime { get{} }

 

class DateTime Now { __get; }

 

Shared ReadOnly Property Now() As DateTime

Today

Returns the current date without time part.

 

class property Today: DateTime read;

 

class DateTime Today { get; }

 

static var Today: DateTime { get{} }

 

class DateTime Today { __get; }

 

Shared ReadOnly Property Today() As DateTime

UtcNow

Returns the current UTC datetime.

 

class property UtcNow: DateTime read;

 

class DateTime UtcNow { get; }

 

static var UtcNow: DateTime { get{} }

 

class DateTime UtcNow { __get; }

 

Shared ReadOnly Property UtcNow() As DateTime

 

FromFileTime Windows

Converts a windows filetime to datetime.

 

class method FromFileTime(aFileTime: FILETIME): DateTime

 

static DateTime FromFileTime(FILETIME aFileTime)

 

static func FromFileTime(_ aFileTime: FILETIME) -> DateTime

 

static DateTime FromFileTime(FILETIME aFileTime)

 

Shared Function FromFileTime(aFileTime As FILETIME) As DateTime

Parameters:

  • aFileTime:

FromOleDate

Converts an OLE date (double) to DateTime.

 

class method FromOleDate(aDate: Double): DateTime

 

static DateTime FromOleDate(Double aDate)

 

static func FromOleDate(_ aDate: Double) -> DateTime

 

static DateTime FromOleDate(Double aDate)

 

Shared Function FromOleDate(aDate As Double) As DateTime

Parameters:

  • aDate:

FromSystemTime Windows

Converts a windows system time to Datetime.

 

class method FromSystemTime(aFileTime: SYSTEMTIME): DateTime

 

static DateTime FromSystemTime(SYSTEMTIME aFileTime)

 

static func FromSystemTime(_ aFileTime: SYSTEMTIME) -> DateTime

 

static DateTime FromSystemTime(SYSTEMTIME aFileTime)

 

Shared Function FromSystemTime(aFileTime As SYSTEMTIME) As DateTime

Parameters:

  • aFileTime:

FromUnixTime Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator

Converts a unix timestamp to Datetime.

 

class method FromUnixTime(aStruct: __struct_timespec): DateTime

 

static DateTime FromUnixTime(__struct_timespec aStruct)

 

static func FromUnixTime(_ aStruct: __struct_timespec) -> DateTime

 

static DateTime FromUnixTime(__struct_timespec aStruct)

 

Shared Function FromUnixTime(aStruct As __struct_timespec) As DateTime

Parameters:

  • aStruct:

FromUnixTimeUTC Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator

Converts a unix timestamp to Datetime, presume in UTC.

 

class method FromUnixTimeUTC(aStruct: __struct_timespec): DateTime

 

static DateTime FromUnixTimeUTC(__struct_timespec aStruct)

 

static func FromUnixTimeUTC(_ aStruct: __struct_timespec) -> DateTime

 

static DateTime FromUnixTimeUTC(__struct_timespec aStruct)

 

Shared Function FromUnixTimeUTC(aStruct As __struct_timespec) As DateTime

Parameters:

  • aStruct:

isLeapYear

Check if the year is a leap year.

 

class method isLeapYear(Value: Int32): Boolean

 

static Boolean isLeapYear(Int32 Value)

 

static func isLeapYear(_ Value: Int32) -> Boolean

 

static Boolean isLeapYear(Int32 Value)

 

Shared Function isLeapYear(Value As Int32) As Boolean

Parameters:

  • Value:

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

ToOleDate

Convert a datetime to Ole date (double).

 

class method ToOleDate(aDate: DateTime): Double

 

static Double ToOleDate(DateTime aDate)

 

static func ToOleDate(_ aDate: DateTime) -> Double

 

static Double ToOleDate(DateTime aDate)

 

Shared Function ToOleDate(aDate As DateTime) As Double

Parameters:

  • aDate:

ToSystemTime (DateTime): SYSTEMTIME Windows

Convert this value to a System datetime.

 

class method ToSystemTime(aDateTime: DateTime): SYSTEMTIME

 

static SYSTEMTIME ToSystemTime(DateTime aDateTime)

 

static func ToSystemTime(_ aDateTime: DateTime) -> SYSTEMTIME

 

static SYSTEMTIME ToSystemTime(DateTime aDateTime)

 

Shared Function ToSystemTime(aDateTime As DateTime) As SYSTEMTIME

Parameters:

  • aDateTime:

TryParse (String, String, Locale, DateParserOptions): nullable DateTime

 

class method TryParse(aDateTime: String; aFormat: String; aLocale: Locale; aOptions: DateParserOptions): nullable DateTime

 

static DateTime? TryParse(String aDateTime, String aFormat, Locale aLocale, DateParserOptions aOptions)

 

static func TryParse(_ aDateTime: String, _ aFormat: String, _ aLocale: Locale, _ aOptions: DateParserOptions) -> DateTime!

 

static DateTime TryParse(String aDateTime, String aFormat, Locale aLocale, DateParserOptions aOptions)

 

Shared Function TryParse(aDateTime As String, aFormat As String, aLocale As Locale, aOptions As DateParserOptions) As DateTime?

Parameters:

  • aDateTime:
  • aFormat:
  • aLocale:
  • aOptions:

TryParse (String, String, DateParserOptions): nullable DateTime

 

class method TryParse(aDateTime: String; aFormat: String; aOptions: DateParserOptions): nullable DateTime

 

static DateTime? TryParse(String aDateTime, String aFormat, DateParserOptions aOptions)

 

static func TryParse(_ aDateTime: String, _ aFormat: String, _ aOptions: DateParserOptions) -> DateTime!

 

static DateTime TryParse(String aDateTime, String aFormat, DateParserOptions aOptions)

 

Shared Function TryParse(aDateTime As String, aFormat As String, aOptions As DateParserOptions) As DateTime?

Parameters:

  • aDateTime:
  • aFormat:
  • aOptions:

TryParse (String, Locale, DateParserOptions): nullable DateTime

 

class method TryParse(aDateTime: String; aLocale: Locale; aOptions: DateParserOptions): nullable DateTime

 

static DateTime? TryParse(String aDateTime, Locale aLocale, DateParserOptions aOptions)

 

static func TryParse(_ aDateTime: String, _ aLocale: Locale, _ aOptions: DateParserOptions) -> DateTime!

 

static DateTime TryParse(String aDateTime, Locale aLocale, DateParserOptions aOptions)

 

Shared Function TryParse(aDateTime As String, aLocale As Locale, aOptions As DateParserOptions) As DateTime?

Parameters:

  • aDateTime:
  • aLocale:
  • aOptions:

TryParse (String, DateParserOptions): nullable DateTime

 

class method TryParse(aDateTime: String; aOptions: DateParserOptions): nullable DateTime

 

static DateTime? TryParse(String aDateTime, DateParserOptions aOptions)

 

static func TryParse(_ aDateTime: String, _ aOptions: DateParserOptions) -> DateTime!

 

static DateTime TryParse(String aDateTime, DateParserOptions aOptions)

 

Shared Function TryParse(aDateTime As String, aOptions As DateParserOptions) As DateTime?

Parameters:

  • aDateTime:
  • aOptions:

TryParseISO8601

 

class method TryParseISO8601(aDateTime: String): nullable DateTime

 

static DateTime? TryParseISO8601(String aDateTime)

 

static func TryParseISO8601(_ aDateTime: String) -> DateTime!

 

static DateTime TryParseISO8601(String aDateTime)

 

Shared Function TryParseISO8601(aDateTime As String) As DateTime?

Parameters:

  • aDateTime:

 

constructor

 

constructor

 

DateTime()

 

init()

 

DateTime()

 

Sub New()

constructor (Int64)

 

constructor(aTicks: Int64)

 

DateTime(Int64 aTicks)

 

init(_ aTicks: Int64)

 

DateTime(Int64 aTicks)

 

Sub New(aTicks As Int64)

Parameters:

  • aTicks:

constructor (Int32, Int32, Int32)

 

constructor(aYear: Int32; aMonth: Int32; aDay: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay)

 

init(_ aYear: Int32, _ aMonth: Int32, _ aDay: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay)

 

Sub New(aYear As Int32, aMonth As Int32, aDay As Int32)

Parameters:

  • aYear:
  • aMonth:
  • aDay:

constructor (Int32, Int32, Int32, Int32, Int32)

 

constructor(aYear: Int32; aMonth: Int32; aDay: Int32; anHour: Int32; aMinute: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute)

 

init(_ aYear: Int32, _ aMonth: Int32, _ aDay: Int32, _ anHour: Int32, _ aMinute: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute)

 

Sub New(aYear As Int32, aMonth As Int32, aDay As Int32, anHour As Int32, aMinute As Int32)

Parameters:

  • aYear:
  • aMonth:
  • aDay:
  • anHour:
  • aMinute:

constructor (Int32, Int32, Int32, Int32, Int32, Int32)

 

constructor(aYear: Int32; aMonth: Int32; aDay: Int32; anHour: Int32; aMinute: Int32; aSecond: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute, Int32 aSecond)

 

init(_ aYear: Int32, _ aMonth: Int32, _ aDay: Int32, _ anHour: Int32, _ aMinute: Int32, _ aSecond: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute, Int32 aSecond)

 

Sub New(aYear As Int32, aMonth As Int32, aDay As Int32, anHour As Int32, aMinute As Int32, aSecond As Int32)

Parameters:

  • aYear:
  • aMonth:
  • aDay:
  • anHour:
  • aMinute:
  • aSecond:

constructor (Int32, Int32, Int32, Int32, Int32, Int32, Int32)

 

constructor(aYear: Int32; aMonth: Int32; aDay: Int32; anHour: Int32; aMinute: Int32; aSecond: Int32; aMillisecond: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute, Int32 aSecond, Int32 aMillisecond)

 

init(_ aYear: Int32, _ aMonth: Int32, _ aDay: Int32, _ anHour: Int32, _ aMinute: Int32, _ aSecond: Int32, _ aMillisecond: Int32)

 

DateTime(Int32 aYear, Int32 aMonth, Int32 aDay, Int32 anHour, Int32 aMinute, Int32 aSecond, Int32 aMillisecond)

 

Sub New(aYear As Int32, aMonth As Int32, aDay As Int32, anHour As Int32, aMinute As Int32, aSecond As Int32, aMillisecond As Int32)

Parameters:

  • aYear:
  • aMonth:
  • aDay:
  • anHour:
  • aMinute:
  • aSecond:
  • aMillisecond:

AddDays

Adds a nr of days and returns a new datetime.

 

method AddDays(Value: Int32): DateTime

 

DateTime AddDays(Int32 Value)

 

func AddDays(_ Value: Int32) -> DateTime

 

DateTime AddDays(Int32 Value)

 

Function AddDays(Value As Int32) As DateTime

Parameters:

  • Value:

AddHours

Adds a nr of hours and returns a new datetime.

 

method AddHours(Value: Int32): DateTime

 

DateTime AddHours(Int32 Value)

 

func AddHours(_ Value: Int32) -> DateTime

 

DateTime AddHours(Int32 Value)

 

Function AddHours(Value As Int32) As DateTime

Parameters:

  • Value:

AddMilliseconds

Adds a nr of msec and returns a new datetime.

 

method AddMilliseconds(Value: Int32): DateTime

 

DateTime AddMilliseconds(Int32 Value)

 

func AddMilliseconds(_ Value: Int32) -> DateTime

 

DateTime AddMilliseconds(Int32 Value)

 

Function AddMilliseconds(Value As Int32) As DateTime

Parameters:

  • Value:

AddMinutes

Adds a nr of minutes and returns a new datetime.

 

method AddMinutes(Value: Int32): DateTime

 

DateTime AddMinutes(Int32 Value)

 

func AddMinutes(_ Value: Int32) -> DateTime

 

DateTime AddMinutes(Int32 Value)

 

Function AddMinutes(Value As Int32) As DateTime

Parameters:

  • Value:

AddMonths

Adds a nr of months and returns a new datetime.

 

method AddMonths(Value: Int32): DateTime

 

DateTime AddMonths(Int32 Value)

 

func AddMonths(_ Value: Int32) -> DateTime

 

DateTime AddMonths(Int32 Value)

 

Function AddMonths(Value As Int32) As DateTime

Parameters:

  • Value:

AddSeconds

Adds a nr of seconds and returns a new datetime.

 

method AddSeconds(Value: Int32): DateTime

 

DateTime AddSeconds(Int32 Value)

 

func AddSeconds(_ Value: Int32) -> DateTime

 

DateTime AddSeconds(Int32 Value)

 

Function AddSeconds(Value As Int32) As DateTime

Parameters:

  • Value:

AddTicks

Adds a nr of ticks and returns a new datetime.

 

method AddTicks(Value: Int64): DateTime

 

DateTime AddTicks(Int64 Value)

 

func AddTicks(_ Value: Int64) -> DateTime

 

DateTime AddTicks(Int64 Value)

 

Function AddTicks(Value As Int64) As DateTime

Parameters:

  • Value:

AddYears

Adds a nr of years and returns a new datetime.

 

method AddYears(Value: Int32): DateTime

 

DateTime AddYears(Int32 Value)

 

func AddYears(_ Value: Int32) -> DateTime

 

DateTime AddYears(Int32 Value)

 

Function AddYears(Value As Int32) As DateTime

Parameters:

  • Value:

CompareTo (Object): Int32

 

method CompareTo(a: Object): Int32

 

Int32 CompareTo(Object a)

 

func CompareTo(_ a: Object) -> Int32

 

Int32 CompareTo(Object a)

 

Function CompareTo(a As Object) As Int32

Parameters:

  • a:

CompareTo (DateTime): Int32

Compares this date, and returns 0 if the same, -1 if less, 1 if more.

 

method CompareTo(Value: DateTime): Int32

 

Int32 CompareTo(DateTime Value)

 

func CompareTo(_ Value: DateTime) -> Int32

 

Int32 CompareTo(DateTime Value)

 

Function CompareTo(Value As DateTime) As Int32

Parameters:

  • Value:

Equals (Object): Boolean  virtual    (declared in Object)

Default constructor.

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther: the reference to compare this with.

Equals (Object): Boolean  override virtual

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

 

Function Equals(obj As Object) As Boolean

Parameters:

  • obj:

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

ToLongPrettyDateString

 

method ToLongPrettyDateString(aTimeZone: TimeZone): String

 

String ToLongPrettyDateString(TimeZone aTimeZone)

 

func ToLongPrettyDateString(_ aTimeZone: TimeZone) -> String

 

String ToLongPrettyDateString(TimeZone aTimeZone)

 

Function ToLongPrettyDateString(aTimeZone As TimeZone) As String

Parameters:

  • aTimeZone:

ToShortDateString

 

method ToShortDateString(aTimeZone: TimeZone): String

 

String ToShortDateString(TimeZone aTimeZone)

 

func ToShortDateString(_ aTimeZone: TimeZone) -> String

 

String ToShortDateString(TimeZone aTimeZone)

 

Function ToShortDateString(aTimeZone As TimeZone) As String

Parameters:

  • aTimeZone:

ToShortPrettyDateString

 

method ToShortPrettyDateString(aTimeZone: TimeZone): String

 

String ToShortPrettyDateString(TimeZone aTimeZone)

 

func ToShortPrettyDateString(_ aTimeZone: TimeZone) -> String

 

String ToShortPrettyDateString(TimeZone aTimeZone)

 

Function ToShortPrettyDateString(aTimeZone As TimeZone) As String

Parameters:

  • aTimeZone:

ToShortTimeString

 

method ToShortTimeString(aTimeZone: TimeZone): String

 

String ToShortTimeString(TimeZone aTimeZone)

 

func ToShortTimeString(_ aTimeZone: TimeZone) -> String

 

String ToShortTimeString(TimeZone aTimeZone)

 

Function ToShortTimeString(aTimeZone As TimeZone) As String

Parameters:

  • aTimeZone:

ToString  override virtual

Convert this datetime to string.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToString (TimeZone): String

 

method ToString(aTimeZone: TimeZone): String

 

String ToString(TimeZone aTimeZone)

 

func ToString(_ aTimeZone: TimeZone) -> String

 

String ToString(TimeZone aTimeZone)

 

Function ToString(aTimeZone As TimeZone) As String

Parameters:

  • aTimeZone:

ToString (String, Locale, TimeZone): String

 

method ToString(Format: String; aLocale: Locale; aTimeZone: TimeZone): String

 

String ToString(String Format, Locale aLocale, TimeZone aTimeZone)

 

func ToString(_ Format: String, _ aLocale: Locale, _ aTimeZone: TimeZone) -> String

 

String ToString(String Format, Locale aLocale, TimeZone aTimeZone)

 

Function ToString(Format As String, aLocale As Locale, aTimeZone As TimeZone) As String

Parameters:

  • Format:
  • aLocale:
  • aTimeZone:

ToString (String, TimeZone): String

 

method ToString(Format: String; aTimeZone: TimeZone): String

 

String ToString(String Format, TimeZone aTimeZone)

 

func ToString(_ Format: String, _ aTimeZone: TimeZone) -> String

 

String ToString(String Format, TimeZone aTimeZone)

 

Function ToString(Format As String, aTimeZone As TimeZone) As String

Parameters:

  • Format:
  • aTimeZone:

ToString (String, String, TimeZone): String

 

method ToString(Format: String; Culture: String; aTimeZone: TimeZone): String

 

String ToString(String Format, String Culture, TimeZone aTimeZone)

 

func ToString(_ Format: String, _ Culture: String, _ aTimeZone: TimeZone) -> String

 

String ToString(String Format, String Culture, TimeZone aTimeZone)

 

Function ToString(Format As String, Culture As String, aTimeZone As TimeZone) As String

Parameters:

  • Format:
  • Culture:
  • aTimeZone:

ToSystemTime Windows

Convert this value to a System datetime.

 

method ToSystemTime: SYSTEMTIME

 

SYSTEMTIME ToSystemTime()

 

func ToSystemTime() -> SYSTEMTIME

 

SYSTEMTIME ToSystemTime()

 

Function ToSystemTime() As SYSTEMTIME