DateDifferenceMBS class
Online Documentation - Statistics - FAQ - Plugin Parts (All , Dependencies ) - Class hierarchy
New in Version
22.2
22.3
22.4
22.5
23.0
23.1
23.2
23.3
23.4
23.5
24.0
24.1
The list of the topics ,
classes ,
interfaces ,
controls ,
modules ,
global methods by category ,
global methods by name ,
screenshots ,
licenses
and examples .
Platforms to show: All Mac Windows Linux Cross-Platform
DateDifferenceMBS class
A class to calculate the difference between two dates.
Example
// calculate difference between now and a date in 2008. dim d as datedim r as DateDifferenceMBSdim s as string dim c as Clipboard d=new date d.Year=2008 d.Month=7 d.Day=2 d.Hour=10 d.Minute=48 d.Second=22dim e as new date // today r=new DateDifferenceMBS(d, e) s= "Years: " +str(r.Year)+EndOfLine s=s+"Months: " +str(r.month)+EndOfLine s=s+"Days: " +str(r.day)+EndOfLine s=s+"Hours: " +str(r.hour)+EndOfLine s=s+"Minutes: " +str(r.Minute)+EndOfLine s=s+"Seconds: " +str(r.Second)+EndOfLine MsgBox s
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
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.
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:
Blog Entries
Release notes
Version 24.1
Version 20.3
Version 20.0
Version 19.5
The items on this page are in the following plugins: MBS Util Plugin .
DatagramMBS
-
DateTimePicker