<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ADay_Of_Week_Alternative</id>
	<title>TI-BASIC:Day Of Week Alternative - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ADay_Of_Week_Alternative"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Day_Of_Week_Alternative&amp;action=history"/>
	<updated>2026-04-23T08:58:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:Day_Of_Week_Alternative&amp;diff=1338&amp;oldid=prev</id>
		<title>Maintenance script: Automated @@ correction</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Day_Of_Week_Alternative&amp;diff=1338&amp;oldid=prev"/>
		<updated>2016-02-24T22:10:02Z</updated>

		<summary type="html">&lt;p&gt;Automated @@ correction&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:10, 24 February 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Template:TI-BASIC:Routine&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Template:TI-BASIC:Routine&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|picture=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;@@&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|picture=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|summary=Calculates the day of week of a date, without using [[TI-BASIC:Dayofwk|DayOfWk(]] (because it&amp;#039;s only available on the 84+ and 84+SE)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|summary=Calculates the day of week of a date, without using [[TI-BASIC:Dayofwk|DayOfWk(]] (because it&amp;#039;s only available on the 84+ and 84+SE)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|input=&amp;#039;&amp;#039;D&amp;#039;&amp;#039; - The day&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|input=&amp;#039;&amp;#039;D&amp;#039;&amp;#039; - The day&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|compatibility=TI-83/84/+/SE&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|compatibility=TI-83/84/+/SE&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|author=Michael Keith&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|author=Michael Keith&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|authors=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;@@&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|authors=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|url=http://cadaeic.net/&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|url=http://cadaeic.net/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|download=[file weekday2.zip]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|download=[file weekday2.zip]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:Day_Of_Week_Alternative&amp;diff=658&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Day_Of_Week_Alternative&amp;diff=658&amp;oldid=prev"/>
		<updated>2016-02-24T18:12:09Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:TI-BASIC:Routine&lt;br /&gt;
|picture=@@&lt;br /&gt;
|summary=Calculates the day of week of a date, without using [[TI-BASIC:Dayofwk|DayOfWk(]] (because it&amp;#039;s only available on the 84+ and 84+SE)&lt;br /&gt;
|input=&amp;#039;&amp;#039;D&amp;#039;&amp;#039; - The day&lt;br /&gt;
&amp;#039;&amp;#039;M&amp;#039;&amp;#039; - The month&lt;br /&gt;
&amp;#039;&amp;#039;Y&amp;#039;&amp;#039; - The year (Any year at all)&lt;br /&gt;
|output=&amp;#039;&amp;#039;Ans&amp;#039;&amp;#039; - 0-6 = the day of week (Sunday - Saturday)&lt;br /&gt;
|variable=D, M, Y, Ans&lt;br /&gt;
|compatibility=TI-83/84/+/SE&lt;br /&gt;
|author=Michael Keith&lt;br /&gt;
|authors=@@&lt;br /&gt;
|url=http://cadaeic.net/&lt;br /&gt;
|download=[file weekday2.zip]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
 :Y-(M&amp;lt;3&lt;br /&gt;
 :round(7fPart((int(23M/9)+D+4+Y+int(Ans/4)-int(Ans/ᴇ2)+int(Ans/400)-2(M≥3))/7&lt;br /&gt;
&lt;br /&gt;
This is the TI-BASIC version of a Day of Week formula in C by Michael Keith, found at the beginning of [[TI-BASIC:Http://cadaeic.net/calendar.htm|this page]]. The formula is {{(d+=m&amp;lt;3?y--:y-2,23*m/9+d+4+y/4-y/100+y/400)%7}}, a mere 45 characters. In comparison with the other Day of the Week routine, this handles not just the years between 1950 and 2049.[[TI-BASIC:Footnote|Footnote]] If you have a TI-84+/SE or a TI-8+ OS 1.15 (at least), replace {{int(Ans/ᴇ2)}} with {{int(sub(Ans))}}. [[TI-BASIC:/footnote|/footnote]]&lt;br /&gt;
&lt;br /&gt;
There is also a human-readable version on the site, as follows.&lt;br /&gt;
&amp;gt; dayofweek = ( [23m/9] + d + 4 + y + [z/4] - [z/100] + [z/400] - 2 (if m ≥ 3) ) mod 7&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; where &lt;br /&gt;
&amp;gt; [x] means to truncate downward to the nearest integer, and&lt;br /&gt;
&amp;gt; z = y - 1 if m &amp;lt; 3,&lt;br /&gt;
&amp;gt; z = y otherwise.&lt;br /&gt;
&lt;br /&gt;
= Why it Works =&lt;br /&gt;
&lt;br /&gt;
Directly from [[TI-BASIC:Http://cadaeic.net/calendar.htm|this website]]:&lt;br /&gt;
&amp;gt; Assume for the moment that February has 30 days (we&amp;#039;ll correct for this later). Then the number of days in each of month is 31, 30, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, which modulo 7 is 3, 2, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3. Now stick a 2 before this sequence and a 2 3 2 3 3 after it, and you get (2) 3 2 3 2 3 2 3 3 2 3 2 3 (2 3 2 3 3), which is just 2,3,2,3,2,3,2,3,3 repeated twice. But - this is the key - these numbers are the first differences of the sequence [23m/9] = (2,5,7,10,12,15,17,20,23). Therefore, the term [23m/9] adds the sum (mod 7) of the total number of days in months 1 to m-1 to the day of the week, thus correctly adjusting the formula for the months that have passed prior to m.&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; The next term, d, simply adjusts the sum based on the day of the month. The constant term, 4, shifts the result to correctly align with the calendar.[[TI-BASIC:Footnote|Footnote]] Note: You can change the constant to 5 in the formula for returning Monday as 0, Tuesday as 1, etc. [[TI-BASIC:/footnote|/footnote]] The next term, y, adds 1 for each passing year, since 365 = 1 mod 7. The next three terms add 1 (the leap day) for each leap year that&amp;#039;s passed since the &amp;quot;base date&amp;quot;, including this year. To complete the correct formula requires handling two exceptions:&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; # If m ≥ 3 (we are later than February), then we must subtract 2 because February actually has 28 days rather than the 30 we assumed.&lt;br /&gt;
&amp;gt; # If m &amp;lt; 3 (the opposite case), then we must use z = y-1 rather than z = y. This causes the leap-day correction term to not include the leap day for the given year, since in this case it hasn&amp;#039;t yet occured.&lt;br /&gt;
&lt;br /&gt;
= Display Day =&lt;br /&gt;
&lt;br /&gt;
Just as the other formula, append the following code to display the day of the week:&lt;br /&gt;
&lt;br /&gt;
 :Disp sub(&amp;quot;SUNDAY***MONDAY***TUESDAY**WEDNESDAYTHURSDAY*FRIDAY***SATURDAY*&amp;quot;,9Ans+1,9      //replace *s with spaces&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Error Conditions =&lt;br /&gt;
&lt;br /&gt;
* None known.&lt;br /&gt;
&lt;br /&gt;
= Related Routines =&lt;br /&gt;
&lt;br /&gt;
* [[TI-BASIC:Day_Of_Week|Day of Week]]&lt;br /&gt;
* [[TI-BASIC:Extended_Clock_Script|Day, Date &amp;amp; Time]]&lt;br /&gt;
* [[TI-BASIC:Easter_Calculation|Easter_Calculation]][[Category:TI-BASIC]]&lt;br /&gt;
[[Category:TIBD]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>