$DayI: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
mNo edit summary
Line 1: Line 1:
<p>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. </p>
<p>The <var>$DAYI</var> 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. </p>
<b>Syntax</b>
<b>Syntax</b>
<p class="code">$DAYI(input-date,century-split)
<p class="syntax">$DAYI(<span class="term">input-date</span>, <span class="term">century-split</span>)
</p>
</p>
<p>Where:</p>
<p>Where:</p>
<ul>
<ul>
<li>input-date is a string in the format CYYDDD. (C is the century; YY is the year, and DDD is the julian day.)</li>
<li><var class="term">input-date</var> is a string in the format <code>CYYDDD</code>. (C is the century; YY is the year, and DDD is the julian day.)</li>
</li>
</li>
<li>century-split is the 2-digit number representing the lowest year in the current century. (Valid values are 00 to 99.)</li>
 
<li><var class="term">century-split</var> is the 2-digit number representing the lowest year in the current century. (Valid values are 00 to 99.)</li>
</li>
</li>
</ul>
</ul>
<b>Usage</b>
<b>Usage</b>
<p>If the century (C) value is omitted, the century is determined by one of the following</p>
<p>If the century (C) value is omitted, the century is determined by one of the following</p>
Line 15: Line 17:
<li>The supplied century split value</li>
<li>The supplied century split value</li>
</li>
</li>
<li>The system defined century split value (CENTSPLT)</li>
<li>The system defined century split value (<var>[[CENTSPLT parameter|CENTSPLT]]</var>)</li>
</li>
</li>
<li>The system default century (DEFCENT)</li>
<li>The system default century (<var>[[DEFCENT parameter|DEFCENT ]]</var>)</li>
</li>
</li>
</ul>
</ul>
<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 CUSTOM=0, where the week days are numbered from 1 through 7, representing Sunday through Saturday. If CUSTOM=3 is selected, the week consists of 2 through 8, representing Monday through Sunday. Full length day names are returned.</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>
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>
 
<b>Examples</b>
<b>Examples</b>
<p>If the default century is 1900 (DEFCENT=19), then:</p>
<p>If the default century is 1900 (<code>DEFCENT=19</code>), then:</p>
<table>
<table>
<caption>Resolving $DAYI function if CUSTOM=0</caption>
<caption>Resolving $DAYI function if CUSTOM=0</caption>
<tr class="head">
<tr class="head">
<th>If CUSTOM =0</th>
<th colspan="4">If CUSTOM =0</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</tr>
<tr>
 
<td>Input-date</td>
<tr class="head">
<td>Representing</td>
<th>Input-date</th>
<td>Returns</td>
<th>Representing</th>
<td>Representing</td>
<th>Returns</th>
<th>Representing</th>
</tr>
</tr>
<tr>
<tr>
<td>$DAYI('100032')</td>
<td>$DAYI('100032')</td>
Line 44: Line 49:
<td>Tuesday</td>
<td>Tuesday</td>
</tr>
</tr>
<tr>
<tr>
<td>$DAYI(97001',50)</td>
<td>$DAYI(97001',50)</td>
Line 50: Line 56:
<td>Wednesday</td>
<td>Wednesday</td>
</tr>
</tr>
<tr>
<tr>
<td>$DAYI('23001',50)</td>
<td>$DAYI('23001',50)</td>
Line 56: Line 63:
<td>Sunday</td>
<td>Sunday</td>
</tr>
</tr>
<tr>
 
<td>If CUSTOM=3</td>
<tr class="head">
<td>&nbsp;</td>
<th colspan="4">If CUSTOM=3</th>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tr>
<tr>
 
<td>Input-date</td>
<tr class="head">
<td>Representing</td>
<th>Input-date</th>
<td>Returns</td>
<th>Representing</th>
<td>Representing</td>
<th>Returns</th>
<th>Representing</th>
</tr>
</tr>
<tr>
<tr>
<td>$DAYI('100032')</td>
<td>$DAYI('100032')</td>

Revision as of 22:32, 30 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 is CUSTOM=0, where the week days are numbered from 1 through 7, representing Sunday through Saturday. If CUSTOM=3 is selected, 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 function if CUSTOM=0
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