Functions

All the functions in OBDATE have been designed to generated and compiled directly. This has already been done for you in the pre-compiled C++ libraries supplied with Obsydian. However, if you need to specialize a particular function, each has edit points before and after the main calculation so that you can create your own version, by inheritance, and add any code you need.

The functions fall into three categories, validations, calculations and conversions.

VALIDATIONS

Quick Reference

You want to validate… Call
ISO Date Validate ISO date
Numeric date 6 Validate date 6
Numeric date 7 Validate date 7
Numeric date 8 Validate date 8
Structure date Validate structure date
ISO time Validate ISO time
Numeric time Validate numeric time
Structure time Validate structure time

CALCULATIONS

Many of the calculations allow you to exclude particular days of the week from the calculation. Each day of the week has its own parameter to these functions and can be set to *Yes or *No. In the quick reference table an entry of 'DOW array' indicates a function has these fields as formal input parameters.

Quick Reference

You want to calculate… Call Input parameter types Output parameter types
a new date a number of days from a starting date. Add n days to date Structure date
Days to increment
DOW array
Structure date
a new date a number of months from a starting date. Add n months to date Structure date
Months to increment
Structure date
a new date and time a number of hours, minutes and seconds from a start date and time. Add time to time Structure date
Structure time
Hours to increment
Minutes to increment
Seconds to increment
Structure date
Structure time
if the date is selected. Check if date is selected Structure date
DOW array
Date is selected
if the date is in a leap year. Check if leap year Structure date Leap year?
If the time is morning or afternoon. Check if time is AM or PM Structure time Time AM or PM
the number of days a date is from 1st Jan 0000. Get absolute days for date Structure date Absolute day number
a date from the number of days from 1st Jan 0000. Get date for absolute days Absolute day number Structure date
the number of years, months and days between two dates. Get date interval Start structure date
End structure date
Number of years
Number of months
Number of days
the day of the week for a date where Monday=1 Get day of week Structure date Day of week
the number of days between two dates Get days between dates Start structure date
End structure date
DOW array
Number of days
the number of selected days into the month for a date. Get days in month to date Structure date
DOW array
Days in month
the number of selected days into the week for a date. Get days in week to date Structure date
DOW array
Number of days
the number of selected days into the year for a date. Get days in year to date Structure date
DOW array
Number of days
the total number of minutes between two times Get minutes between times Start structure date
Start structure time
End structure date
End structure time
Total minutes
the number of minutes into the day for a time. Get minutes from midnight Structure time Total minutes
the number of complete months between two dates Get months between dates Start structure date
End structure date
Number of months
the total number of seconds between two times. Get seconds between times Start structure date
Start structure time
End structure date
End structure time
Total seconds
the number of seconds into the day for a time. Get seconds from midnight Structure time Total seconds
the total number of selected days in the month for a date. Get selected days for month Structure date
DOW array
Selected days in month
the total number of selected days in the year for a date. Get selected days in year Structure date
DOW array
Selected days in year
the number of days, hours, minutes and seconds between two times Get time interval Start structure date
Start structure time
End structure date
End structure time
Number of days
Number of hours
Number of minutes
Number of seconds
the year, short year, month and day from a date. Get year month day from date Structure date Extracted year
Extracted month
Extracted day
Extracted short year