Platforms to show: All Mac Windows Linux Cross-Platform
NSDateComponentsMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa | MBS MacBase Plugin | 12.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
It is used to specify a date by providing the temporal components that make up a date and time: hour, minutes, seconds, day, month, year, and so on. It can also be used to specify a duration of time, for example, 5 hours and 16 minutes. An NSDateComponents object is not required to define all the component fields. When a new instance of NSDateComponents is created the date components are set to NSUndefinedDateComponent.
- 22 properties
- property calendar as NSCalendarMBS
- property date as date
- property dateTime as DateTime
- property day as Integer
- property description as string
- property era as Integer
- property Handle as Integer
- property hour as Integer
- property isLeapMonth as Boolean
- property isValidDate as Boolean
- property minute as Integer
- property month as Integer
- property quarter as Integer
- property second as Integer
- property timeZone as NSTimeZoneMBS
- property week as Integer
- property weekday as Integer
- property weekdayOrdinal as Integer
- property weekOfMonth as Integer
- property weekOfYear as Integer
- property year as Integer
- property yearForWeekOfYear as Integer
- 4 methods
- method Constructor
- method copy as NSDateComponentsMBS
- method isValidDateInCalendar(calendar as NSCalendarMBS) as Boolean
- method Print
- shared method NSUndefinedDateComponent as Integer
This class has no sub classes.
Some methods using this class:
- NSCalendarMBS.componentsInTimeZone(timezone as NSTimeZoneMBS, date as Date) as NSDateComponentsMBS
- NSCalendarMBS.componentsInTimeZone(timezone as NSTimeZoneMBS, date as DateTime) as NSDateComponentsMBS
- NSCalendarMBS.dateByAddingComponents(components as NSDateComponentsMBS, toDate as Date, Options as Integer = 0) as Date
- NSCalendarMBS.dateFromComponents(components as NSDateComponentsMBS) as Date
- NSCalendarMBS.dateTimeByAddingComponents(components as NSDateComponentsMBS, toDate as DateTime, Options as Integer = 0) as DateTime
- NSCalendarMBS.dateTimeFromComponents(components as NSDateComponentsMBS) as DateTime
- UNCalendarNotificationTriggerMBS.Constructor(dateComponents as NSDateComponentsMBS, repeats as boolean)
- UNCalendarNotificationTriggerMBS.trigger(dateComponents as NSDateComponentsMBS, repeats as boolean) as UNCalendarNotificationTriggerMBS
Some properties using for this class:
- CNContactMBS.birthday as NSDateComponentsMBS
- CNContactMBS.nonGregorianBirthday as NSDateComponentsMBS
- CNMutableContactMBS.birthday as NSDateComponentsMBS
- CNMutableContactMBS.nonGregorianBirthday as NSDateComponentsMBS
- EKReminderMBS.dueDateComponents as NSDateComponentsMBS
- EKReminderMBS.startDateComponents as NSDateComponentsMBS
- NSUserNotificationMBS.deliveryRepeatInterval as NSDateComponentsMBS
- UNCalendarNotificationTriggerMBS.dateComponents as NSDateComponentsMBS
Some examples using this class:
- /Mac64bit/Contacts/Contacts Display Person
- /Mac64bit/Contacts/Contacts Test
- /Mac64bit/EventKit/EventKit
Blog Entries
- News from the MBS Xojo Plugins Version 20.1
- MBS Xojo Plugins, version 20.1pr1
- MBS Real Studio Plugins, version 12.3pr11
Release notes
- Version 20.1
- Added isValidDateInCalendar and isValidDate for NSDateComponentsMBS class.
- Updated NSDateComponentsMBS class to have debugger visible properties.
The items on this page are in the following plugins: MBS MacBase Plugin.
NSDataDetectorMBS - NSDateIntervalMBS