Daycount Function

Top  Previous  Next

 

Function:

Returns the day number for a given year, month, and date.

Syntax:

daycount(year as byte, month as byte, date as byte) as word

Returns:

Day number elapsed since 1-JAN-2000 (this is day #0). The range is 0-36524.

See Also:

year, month, date, weekday, hours, minutes, mincount

 


Part

Description

year

The year is supplied as offset from year 2000 (so, it is 6 for year 2006). Acceptable year range is 0-99 (2000-2099).

month

1-12 for January-December

date

Date of the month

Details

If any input parameter is illegal (year exceeds 99, month exceeds 12, etc.) this syscall will return 65535. This error value cannot be confused with an actual valid day number since the maximum day number recognized by this syscall is 12-DEC-2099 (day number 36524).

Examples

 

w = daycount(06, 10, 15) ' result will be 2479 (the serial day number for October 15th, 2006)