Property | Value |
---|---|
Hex Value | $EF06 |
Categories | |
Localizations |
|
dayOfWk(
Overview
Returns an integer from 1 to 7, with each integer representing a day of the week. Use dayOfWk(
to determine on which day of the week a particular date would occur. The year
must be 4 digits; month
and day
can be 1 or 2 digits.
Availability: Token available everywhere.
Syntax
dayOfWk(year,month,day)
Arguments
Name | Type | Optional |
---|---|---|
year | ||
month | ||
day |
Location
2nd, catalog, dayOfWk(
, 1:Sunday
, 2:Monday
, 3:Tuesday...
Description
dayOfWk(year,month,day) returns an integer from 1 to 7, each representing a separate day of the week. 1 represents Sunday, 2 represents Monday, and so on, with 7 representing Saturday. The date format is different than the normal American format (month/day/year), so be careful to put the arguments in the right order. You can remember this by thinking of the descending lengths of time in each of the arguments.
:dayOfWk(2007,12,30)
The above code returns 1, because the 30th of December, 2007, is a Sunday.
Error Conditions
- ERR:DOMAIN is thrown if any of the arguments are non-integers, or the date does not exist, such as the 42nd of February. However, the year does not matter (a date that takes place in the year 10000 is valid). However, there are exceptions, even if some dates do exist, this error may still occur. If you attempt to calculate the previous day of a week such as the previous day, the error may still occur.
Related Commands
See Also
- Day of Week — routine to calculate the day of the week
Source: parts of this page were written by the following TI|BD contributors: DarkerLine, GoVegan, iPhoenixOnTIBD, Myles_Zadok, nap386, Weregoose, Xphoenix.
History
Calculator | OS Version | Description |
---|---|---|
TI-84+ | 0.01 | Added |