$DayI

From m204wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The $DAYI function takes an input day number and the century-split and resolves the date. The value returned is a number reflecting the day of the week for the given date.

Syntax

$DAYI(input-date, century-split)

Where:

  • input-date is a string in the format CYYDDD. (C is the century; YY is the year, and DDD is the julian day.)
  • century-split is the 2-digit number representing the lowest year in the current century. (Valid values are 00 to 99.)

Usage

If the century (C) value is omitted, the century is determined by one of the following

  • The supplied century split value
  • The system defined century split value (CENTSPLT)
  • The system default century (DEFCENT )

If the year is omitted, the current Model 204 defined year is used. The Julian day is required.

The default operation assumes the CUSTOM value is 0, where the week days are numbered from 1 through 7, representing Sunday through Saturday. For CUSTOM=3, the week consists of 2 through 8, representing Monday through Sunday. Full-length day names are returned.

Examples

If the default century is 1900 (DEFCENT=19), then:

Resolving $DAYI depending on CUSTOM value
If CUSTOM=0
Input-date Representing Returns Representing
$DAYI('100032') February 1, 2000 3 Tuesday
$DAYI(97001',50) January 1, 1997 4 Wednesday
$DAYI('23001',50) January 1, 2023 1 Sunday
If CUSTOM=3
Input-date Representing Returns Representing
$DAYI('100032') February 1, 2000 3 Tuesday
$DAYI(97001',50) January 1, 1997 4 Wednesday
$DAYI('23001',50) January 1, 2023 8 Sunday