CometDate

From CometWiki

(Difference between revisions)
Jump to: navigation, search
m (minor)
m (minor)
Line 1: Line 1:
-
'''CometDatefunction'''  
+
'''CometDate Function'''  
'''Syntax:'''  CometDate(Month, Day, Year)   
'''Syntax:'''  CometDate(Month, Day, Year)   
Line 10: Line 10:
The numeric arguments, Month, Day and Year are not checked for validity. Physical errors will not result from insane day-month combinations like the 87th day of the 45th month, but the results will obviously not make much sense.
The numeric arguments, Month, Day and Year are not checked for validity. Physical errors will not result from insane day-month combinations like the 87th day of the 45th month, but the results will obviously not make much sense.
-
There is no year 0 AD, The date goes from 1BC to 1AD. The practical range of CometDates is -657071 (01/01/01) to 2994623 (12/31/9999) but dates outside of that range may be usable in some contexts.
+
The practical range of CometDates is -657071 (01/01/01) to 2994623 (12/31/9999) but dates outside of that range may be usable in some contexts. There is no year 0 AD, The date goes from 1BC to 1AD.
 +
 
 +
*'''Date Arithmetic''' -- Since CometDates are numbers, all arithmetic operators will work on them. Keep in mind that all conversion routines will use just the integer portion of the CometDate presented.
 +
 
 +
For a reference of all of the functions associated with CometDates see this page [[CometDates]].

Revision as of 18:19, 8 December 2010

CometDate Function

Syntax: CometDate(Month, Day, Year)

Discussion: The CometDate function converts three numeric arguments into a CometDate Date Serial Number. CometDates are based on a date of January 1, 1800. CometDates before that date are negative and after are positive.

The CometDate function respects the rules for leap years (i.e., the years 1800 and 1900 were not leap years, but the year 2000 is a leap year).

The numeric arguments, Month, Day and Year are not checked for validity. Physical errors will not result from insane day-month combinations like the 87th day of the 45th month, but the results will obviously not make much sense.

The practical range of CometDates is -657071 (01/01/01) to 2994623 (12/31/9999) but dates outside of that range may be usable in some contexts. There is no year 0 AD, The date goes from 1BC to 1AD.

  • Date Arithmetic -- Since CometDates are numbers, all arithmetic operators will work on them. Keep in mind that all conversion routines will use just the integer portion of the CometDate presented.

For a reference of all of the functions associated with CometDates see this page CometDates.