$DayI: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (Mlarocca moved page $DAYI to $DayI: Lower case change)
 
(2 intermediate revisions by one other user not shown)
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>
<p>If the default century is 1900 (<code>DEFCENT=19</code>), 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 depending on CUSTOM value</caption>


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


Line 46: Line 46:
<td>$DAYI('100032')</td>
<td>$DAYI('100032')</td>
<td>February 1, 2000</td>
<td>February 1, 2000</td>
<td align="right">3</td>
<td align="center">3</td>
<td>Tuesday</td>
<td>Tuesday</td>
</tr>
</tr>
Line 53: Line 53:
<td>$DAYI(97001',50)</td>
<td>$DAYI(97001',50)</td>
<td>January 1, 1997</td>
<td>January 1, 1997</td>
<td align="right">4</td>
<td align="center">4</td>
<td>Wednesday</td>
<td>Wednesday</td>
</tr>
</tr>
Line 60: Line 60:
<td>$DAYI('23001',50)</td>
<td>$DAYI('23001',50)</td>
<td>January 1, 2023</td>
<td>January 1, 2023</td>
<td align="right">1</td>
<td align="center">1</td>
<td>Sunday</td>
<td>Sunday</td>
</tr>
</tr>
Line 78: Line 78:
<td>$DAYI('100032')</td>
<td>$DAYI('100032')</td>
<td>February 1, 2000</td>
<td>February 1, 2000</td>
<td align="right">3</td>
<td align="center">3</td>
<td>Tuesday</td>
<td>Tuesday</td>
</tr>
</tr>
Line 84: Line 84:
<td>$DAYI(97001',50)</td>
<td>$DAYI(97001',50)</td>
<td>January 1, 1997</td>
<td>January 1, 1997</td>
<td align="right">4</td>
<td align="center">4</td>
<td>Wednesday</td>
<td>Wednesday</td>
</tr>
</tr>
Line 90: Line 90:
<td>$DAYI('23001',50)</td>
<td>$DAYI('23001',50)</td>
<td>January 1, 2023</td>
<td>January 1, 2023</td>
<td align="right">8</td>
<td align="center">8</td>
<td>Sunday</td>
<td>Sunday</td>
</tr>
</tr>
</table>
</table>
[[Category:SOUL $functions]]
[[Category:SOUL $functions]]

Latest revision as of 13:07, 17 July 2014

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