$DayI: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 25: Line 25:
If the year is omitted, the current <var class="product">Model&nbsp;204</var> defined year is used. The Julian day is required.</p>
If the year is omitted, the current <var class="product">Model&nbsp;204</var> defined year is used. The Julian day is required.</p>
<p>
<p>
The default operation is <code>CUSTOM=0</code>, where the week days are numbered from 1 through 7, representing Sunday through Saturday. If <code>CUSTOM=3</code> is selected, the week consists of 2 through 8, representing Monday through Sunday. Full-length day names are returned.</p>
The default operation assumes the [[CUSTOM parameter|CUSTOM]] value is 0, where the week days are numbered from 1 through 7, representing Sunday through Saturday. For <code>CUSTOM=3</code>, the week consists of 2 through 8, representing Monday through Sunday. Full-length day names are returned. </p>


<b>Examples</b>
<b>Examples</b>
Line 33: Line 33:


<tr class="head">
<tr class="head">
<th colspan="4">If CUSTOM =0</th>
<th colspan="4">If CUSTOM=0</th>
</tr>
</tr>



Revision as of 00:30, 31 December 2013

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