Abstract meaningsThe exact meanings of these values depends on the application. The systems developer has to know what these are.
Beginning of time,
End of time or
Day has well defined rules for how to process these in various contexts.
|| This is 'a date that might appear on a calendar'.
- Just a year
- Just a year and month
- A year month and day
||This applies to days with unspecified 'more significant' components. ie.
- Only month and day components specified. eg. Birthday
- Only day component specified. eg. Monthly pay day
|Fully specified date||
A calendar date where the three elements, year, month and day are defined and real. If it is 'one square' of the calendar on your wall then it's fully specified.|
A DAYo object may be used to explicitly represent a time period expressed as ±,Y,M,D.|
- The sign applies to the whole.
- Intervals should not be used to represent dates.
The number of days elapsed since January 1st 4713 BC. For our purposes a serial number for days which always 'counts one' every 24 hours. This only applies to fully specified dates, but where this holds we can do exact date arithmetic..|
WarningDo not get the terminology of Periods mixed up with Intervals. An Interval is a particular type of Day object. A Period is a lack of Precision.
A date never specifies a moment in time. The least span of time it covers is 24 hours. The Period of a date is the full range of possible dates that it might cover. For example "May 2007" covers a Period from "1st May 2007" to "31st May 2007" inclusive.
Analogous to numerical precision when dates are specified as Y-M-D with Y being the most and D being least significant. Part of the power of Day is being able to deal with imprecise values.|
A top-level indicator of the type of value contained in a day encoding.|
|AllowDayOnlyIntervals||optional boolean new value
Get/Set do we allow INTs to be created with more than 31 days eg +0y 0m 66d
If not then the conversion factor 30.4375 (365.25/12) will be used.
|AllowExcessDaysInMonth||optional boolean new value
Get/Set true if we allow silent coercing of slightly too many days in month to end of month
For example is 31st September assumed to be the last day of September? If this is false then an input error will be raised.
|BCIndicator||Optional string new value
Get/set the string used for BC indication.
Do not call with a null string unless you want the BC indicator to be eliminated!
Get/Set numeric value of IMPLIED_YEAR
Allowable inputs are 0,-1,-2 or a year > 999
|InYearLimits||(Integer year to test),
Check to ensure the year given is within current limits.
Only applies to INT and Cal.
There will always be an Initialise method which will set up the environment according to (a) some file or (b) some text.
The JS implementation leaves getting a file to the programmer and takes the text, thus avoiding async issues.
Get/set whether element order is D-M-Y (False if M-D-Y)
|Lookup||(string Key, integer number)
This is a low-level method to access the dictionary
|MonthName||(integer Number, integer Version)
Look up the month name for the given number. Version is 1 to 4 depending on the length required.
Use the string supplied to see if it will match with any month names. If so then retirn 1 for Jnuary and so on. Return 0 for no match.
This only matches when there is exactly one match even if that match is partial. For example J would fail as not being specific but Janua would succeed as although it is partial it can only refer to one month.
See if input matches one of the shortcut formats. For example be would match with Beginning-of-time and would return BoT. If there's no match then return a null string.
|SetKeyValue||(string Key, string Value)
This is a low-level method of setting some element of the environment.
It is not persistent over sessions.
Get/set TWO_DIGIT_FIX Allowed values are 0, 20 and 50