TI-BASIC:Extended Clock Script

From Learn @ Cemetech
Jump to navigationJump to search

Routine Summary

Shows the time, date, and day of week.



Variables Used

Calculator Compatibility

TI-84/+/SE Author

2Tie Download

No download provided.

:Disp sub("***SUN***MON**TUESWEDNES*THURS***FRI*SATUR",6Ans-5,6)+"DAY      //replace *s with spaces
:Disp getDtStr(getDtFmt
:Disp getTmStr(getTmFmt

First, 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.


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.


Error 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