DateTime

Overview

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

Location

 

constructor UIKit for Mac

Creates a default datetime object with the "MinValue" as value.

 

constructor

 

DateTime()

 

init()

 

DateTime()

 

Sub New()

constructor (Int64) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

constructor(aTicks: Int64)

 

DateTime(Int64 aTicks)

 

init(_ aTicks: Int64)

 

DateTime(Int64 aTicks)

 

Sub New(aTicks As Int64)

Parameters:

  • aTicks:

constructor (Int32, Int32, Int32) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

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) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

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) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

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) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

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:

constructor (Int32, Int32, Int32) UIKit for Mac

Creates a new object with a given date.

 

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) UIKit for Mac

Creates a new object with a given date and time.

 

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) UIKit for Mac

Creates a new object with a given date and time.

 

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) UIKit for Mac

Creates a new object with a given date and time.

 

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:

constructor (Int64) UIKit for Mac

Creates a new object given the nr of ticks.

 

constructor(aTicks: Int64)

 

DateTime(Int64 aTicks)

 

init(_ aTicks: Int64)

 

DateTime(Int64 aTicks)

 

Sub New(aTicks As Int64)

Parameters:

  • aTicks:

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

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) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

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:

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:

Equals (Object): Boolean  virtual    (declared in Object) UIKit for Mac

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: the reference to compare this with.

Finalize  protected virtual    (declared in Object) UIKit for Mac

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

Finalize()

 

func Finalize()

 

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, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, 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, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, 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

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:

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:

ToString  override virtual

Convert this datetime to string.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

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:

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, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, 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, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, 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:

 

constructor UIKit for Mac

Creates a default datetime object with the "MinValue" as value.

 

constructor

 

DateTime()

 

init()

 

DateTime()

 

Sub New()

constructor (Int64) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

constructor(aTicks: Int64)

 

DateTime(Int64 aTicks)

 

init(_ aTicks: Int64)

 

DateTime(Int64 aTicks)

 

Sub New(aTicks As Int64)

Parameters:

  • aTicks:

constructor (Int32, Int32, Int32) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

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) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

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) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

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) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

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:

constructor (Int32, Int32, Int32) UIKit for Mac

Creates a new object with a given date.

 

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) UIKit for Mac

Creates a new object with a given date and time.

 

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) UIKit for Mac

Creates a new object with a given date and time.

 

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) UIKit for Mac

Creates a new object with a given date and time.

 

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:

constructor (Int64) UIKit for Mac

Creates a new object given the nr of ticks.

 

constructor(aTicks: Int64)

 

DateTime(Int64 aTicks)

 

init(_ aTicks: Int64)

 

DateTime(Int64 aTicks)

 

Sub New(aTicks As Int64)

Parameters:

  • aTicks:

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

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) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

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:

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:

Equals (Object): Boolean  virtual    (declared in Object) UIKit for Mac

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: the reference to compare this with.

Finalize  protected virtual    (declared in Object) UIKit for Mac

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

Finalize()

 

func Finalize()

 

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

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:

ToString  override virtual

Convert this datetime to string.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToSystemTime Windows

Convert this value to a System datetime.

 

method ToSystemTime: SYSTEMTIME

 

SYSTEMTIME ToSystemTime()

 

func ToSystemTime() -> SYSTEMTIME

 

SYSTEMTIME ToSystemTime()

 

Function ToSystemTime() As SYSTEMTIME