Platforms to show: All Mac Windows Linux Cross-Platform
DateDifferenceMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Basic | MBS Util Plugin | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Calculates the difference between the older and newer date. The dates are sorted, so the difference is always a positive.
You can see Swap property to see if first date is after second date.
This class allows you to know exactly how many months/years are between two dates. Something that TotalSeconds calculations will not give you!
- 26 properties
- property Day as Integer
- property EndDate as Variant
- property EndDay as Integer
- property EndHour as Integer
- property EndMinute as Integer
- property EndMonth as Integer
- property EndSecond as Integer
- property EndTotalSeconds as Double
- property EndYear as Integer
- property Hour as Integer
- property Minute as Integer
- property Month as Integer
- property Ready as Boolean
- property Second as Integer
- property StartDate as Variant
- property StartDay as Integer
- property StartHour as Integer
- property StartMinute as Integer
- property StartMonth as Integer
- property StartSecond as Integer
- property StartTotalSeconds as Double
- property StartYear as Integer
- property Swap as Boolean
- property TotalDay as Integer
- property TotalSeconds as Double
- property Year as Integer
- 5 methods
- method Calc(StartDate as date, EndDate as date) as boolean
- method Calc(StartDate as dateTime, EndDate as dateTime) as boolean
- method Constructor
- method Constructor(StartDate as date, EndDate as date)
- method Constructor(StartDate as dateTime, EndDate as dateTime)
- shared method isLeapYear(year as Integer) as boolean
This class has no sub classes.
Blog Entries
- MBS Xojo Plugins, version 25.1pr5
- MBS Xojo Plugins, version 24.1pr3
- Cleanup Xojo Plugins
- MBS Xojo Plugins, version 20.3pr5
- MBS Xojo Plugins, version 19.5pr4
- MBS Xojo / Real Studio Plugins, version 13.4pr6
- MBS Real Studio Plugins, version 12.4pr9
- MonkeyBread Software Releases the MBS Plugins 8.3
Release notes
- Version 25.1
- Fixed an edge case in DateDifferenceMBS class.
- Version 24.1
- Fixed a bug in DateDifferenceMBS class related to an overflow in January.
- Version 20.3
- Fixed edge case with month wrap in DateDifferenceMBS class.
- Version 20.0
- Fixed DateDifferenceMBS handling of DateTime with respect of TotalSeconds handling.
- Version 19.5
- Implemented DateTime support for DateDifferenceMBS class, ignores time zones.
Some useful global functions for this class:
- DifferenceMBS(extends StartDate as date, EndDate as date) as DateDifferenceMBS
- DifferenceMBS(extends StartDate as dateTime, EndDate as dateTime) as DateDifferenceMBS
Some examples using this class:
The items on this page are in the following plugins: MBS Util Plugin.
