Platforms to show: All Mac Windows Linux Cross-Platform

Back to CFDateMBS class.

CFDateMBS.AbsoluteTime as CFAbsoluteTimeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 3.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The absolute time value for this date.

Returns nil on any error.
timezone is optional and may be nil.

CFDateMBS.Compare(otherdate as CFDateMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 3.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Compares two date objects.

Result codes:
kCFCompareLessThan = -1
kCFCompareEqualTo = 0
kCFCompareGreaterThan = 1

On any error returns 0.

CFDateMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates new date object with current timestamp.
Example
dim d as new CFDateMBS
MsgBox d.date.SQLDateTime

See also:

CFDateMBS.Constructor(date as CFDateMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a new Xojo object with a copy of the CFDate object inside.

See also:

CFDateMBS.Constructor(date as date, timeZone as CFTimeZoneMBS = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 19.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The constructor using Xojo date.
Example
// Xojo now
dim d as new date
// convert to CFDate
dim c as new CFDateMBS(d)
// and convert back
dim x as date = c

// compare in de bugger
dim ds as string = d.SQLDateTime
dim dx as string = x.SQLDateTime

Break

If time zone is nil, we use UTC.

See also:

CFDateMBS.Date(timeZone as CFTimeZoneMBS = nil) as Date

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 19.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a Xojo date from CFDate with given time zoen.

If time zone is nil, we use UTC.

CFDateMBS.DateTime(timeZone as CFTimeZoneMBS = nil) as DateTime

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 20.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a Xojo date from CFDate with given time zoen.

If time zone is nil, we use UTC.

CFDateMBS.Operator_Convert as Date

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 19.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Converts from CFDate to Xojo date in UTC.
Example
// Xojo now
dim d as new date
// convert to CFDate
dim c as new CFDateMBS(d)
// and convert back
dim x as date = c

// compare in de bugger
dim ds as string = d.SQLDateTime
dim dx as string = x.SQLDateTime

Break

See also:

CFDateMBS.Operator_Convert as DateTime

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 20.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Converts from CFDate to Xojo dateTime in UTC.

See also:

CFDateMBS.TimeIntervalSinceDate(otherdate as CFDateMBS) as CFTimeIntervalMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 3.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The dfference between two dates as a time interval.

Returns nil on any error.

The items on this page are in the following plugins: MBS MacCF Plugin.


The biggest plugin in space...