Difference between revisions of "TI-BASIC:Extended Clock Script"
(Initial automated import) |
(Automated @@ correction) |
||
Line 1: | Line 1: | ||
{{Template:TI-BASIC:Routine | {{Template:TI-BASIC:Routine | ||
− | |picture= | + | |picture= |
|summary=Shows the time, date, and day of week. | |summary=Shows the time, date, and day of week. | ||
− | |input= | + | |input= |
− | |output= | + | |output= |
− | |variable= | + | |variable= |
|compatibility=TI-84/+/SE | |compatibility=TI-84/+/SE | ||
|author=2Tie | |author=2Tie | ||
− | |authors= | + | |authors= |
− | |url= | + | |url= |
− | |download= | + | |download= |
}} | }} | ||
Latest revision as of 22:12, 24 February 2016
Routine Summary
Shows the time, date, and day of week.
Inputs
Outputs
Variables Used
Calculator Compatibility
TI-84/+/SE Author
2Tie Download
No download provided.
: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(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.
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,3
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.