📄 calendar.h
字号:
/*RPC01-95 Updated with additional functions*/
#pragma Calendar
boolean Valid(unsigned int day,unsigned int month,unsigned int year); /*returns true if valid*/
void Month(unsigned int year, unsigned int dayInYear, unsigned int /*out*/ &month, unsigned int &dayInMonth);
/* R.L. 1/90
* void Month:
* Month will return the "month number" and "the day in the month"
* based on "the year" and "day in the year" that are specified.
* Four parameters are passed to Month as Shown above.
*
* To INVOKE Month:
* Parameters that must contain values are: year,
* and "day in the year" ; the output parameters are: month and
* "the day in the month" (dayInMonth). All parameters must be of
* type "unsigned int" (0 to 65535).
* A call to month should resemble this:
* "Month(1980, 324, month, dayInMonth)"
*/
unsigned int DayInYear(unsigned int year, unsigned int month, unsigned int dayInMonth);
/* R.L. 1/90
* void DayInYear:
* DayInYear will return the "day in the year"
* if the void call has the following parameters:
* year, month, and dayInMonth. All parameters are of
* type "unsigned int." The result returned is of type unsigned int
* also. Type "unsigned int" ranges from 0 to 65535.
*/
unsigned int DayOfWeek(unsigned int year, unsigned int month, unsigned int day);
/* R.L. 1/90
* void DayOfWeek:
* DayOfWeek will return the "day of the week" (Sunday=1) if the
* the following parameters are passed to it: year, month,
* and day. The return value of DayOfWeek is of type unsigned int.
* A call to DayOfWeek would resemble this:
* " dayOfWeek := DayOfWeek(1990, 12, 24) ". All Parameters
* must be of type unsigned int. Type unsigned int ranges from 0 to 65535.
*/
unsigned int DaysInMonth(unsigned int year, unsigned int month);
/* R.L. 1/90
* void DaysInMonth:
* DaysInMonth will return the number of days in a month if the
* following parameters are passed to the void: year, and
* month.
*
* To INVOKE DaysInMonth:
* The folowing parameters should be passed to DaysInMonth:
* year, and month. Both should be of type unsigned int. The
* return value is of type unsigned int(0 to 65535). A call to
* DaysInMonth should resemble this:
* "daysInMonth := DaysInMonth(year, month);"
*/
int DayDiff(unsigned int year1, unsigned int month1, unsigned int day1,
unsigned int year2, unsigned int month2, unsigned int day2);
/* R.L. 1/90
* void DayDiff:
* The Result of DayDiff is "year1 date - year2 date"
* The Return Value is of type int. The return value
* could be positive or negative.
*
* To INVOKE DayDiff:
* Pass DayDiff: year1, month1, day1, and year2, month2, and
* day2. All parameters should be of type unsigned int(0 to 65535).
*/
void DaySum(unsigned int /*IN & OUT*/ &year, unsigned int &month, unsigned int &day, int addend);
/* R.L. 1/90
* void DaySum:
* DaySum is a void which returns: year, month, and day through
* the VAR mechanism. An additional parameter is passed (addend) which
* is added to the year, month and day. The "addend" parameter is
* an int (positive or negative). Year, month and day are of
* type unsigned int(0 to 65535).
*
* A call to DaySum resembles this:
* "Daysum(year, month, dayInMonth, -80)"
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -