$DayI: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 30: Line 30:
<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">
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]]

Revision as of 00:11, 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 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 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