|
We're glad you came by, but you might find what you're looking for elsewhere. TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it. Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope. |
Shows the time, date, and day of week.
TI-84/+/SE
2Tie
:getDate
:dayOfWk(Ans(1),Ans(2),Ans(3
:Disp sub("***SUN***MON**TUESWEDNES*THURS***FRI*SATUR",6Ans-5,6)+"DAY //replace *s with spaces
:Disp getDtStr(getDtFmt
:Disp getTmStr(getTmFmtFirst, the program acquires the date stored on your TI-84. Then it stores it and manipulates it to get the day of week. It then checks that and displays the result. Then it collects the formats to display the time and date.
Optimization
Although the program is already very small (about 122 bytes), you can make it smaller by shortening the day names to three letters each. This optimization would probably only benefit if you are including this in a larger program that you want as small as possible.
:Disp sub("SUNMONTUEWEDTHUFRISAT",3Ans-2,3Error Conditions
This program should not generate any errors if coded right. It might display incorrect time if the clock is off. Use ClockOn if it is.
Related Routines
.