With apologies to mr womp womp
I had some time to examine the code of mine he was kind enough to look over and make more efficient. I realized that a bug had crept into it for years in the Julian calendar so I made a small correction to it.

While doing this I decided that it would make better sense to enter in the date as YYYY.MMDD rather then as the way I originally had it as MMDD.YYYY. This is because the algorithm allows you to enter both positive and negative years so entering -333.1024 for 24 Oct, -333 makes better sense then -1024.0333


Input "(YYYY.MMDD):",A
If M≤2:Then
If Y=1582 and M=10 and D>4 and D<15:4→D
If Y>1582 or (Y=1582 and M>10) or (Y=1582 and M=10 and D≥15):Then
stbradley wrote:
With apologies to mr womp womp

Not sure why you're apologizing Laughing
I do this in the hopes that some tricks might stick and we can all write more efficient code in the end Wink
A lot of TI-Basic tricks I would strongly advise against in normal non-calculator programming. The parser is just so slow that nobody can afford to have slight inefficiencies, even if it means making the code less readable.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum