I'm now working in ICE, should I also make a TI-BASIC version?
definitely!
 40%  [ 6 ]
Absolutely not!
 13%  [ 2 ]
Just make the main version in TI-BASIC!
 46%  [ 7 ]
Total Votes : 15

I've fixed all bugs there are (for now)!
I hope this were the last bugs...
I've also added a option to see what the current settings are.

But before I am going to upload the new versions to the archive, I want it to be also tested more on how the program feels, but for that I need some 'betatesters'.

So is there anyone who wants to test the programs?
And if so, both versions or specificly the ICE or the BASIC version?
Do you think that you could make a smaller version that could fit into another program?
RoccoLox Programs wrote:
Do you think that you could make a smaller version that could fit into another program?


I could try... Then I'll run it past @Privacy_Dragon to see if it's okay.
RoccoLox Programs wrote:
Do you think that you could make a smaller version that could fit into another program?


Uhm...
That depends on the amount of warnings you want to have.
I (should) have an error for all invalid dates. Removing that errors would decrease the size. I've also some stuff the user can set for himself..
So how small it can be made for using in another program depends on your needs etc..
And it depends on if you want a ICE version or BASIC version...

So if you send me a message (either via mail, pm, or discord) with the details, with or without interface, with our without errors, with or without settings...., I can try.

NonstickAtom875 wrote:
I could try... Then I'll run it past @Privacy_Dragon to see if it's okay

That's also possible, but if possible I would like to try it myself, since that's also a possibility to learn for me, and then if it won't work out, I can send it to you, @NonstickAtom875..
Is 1,8KB small enough?
I've now a BASIC version of 1,8KB.
That doesn't have the interface of the normal version, but does have the settings and errors.
I would prefer it to be smaller. I would like to use it, with your permission, in my Organizer program. I just need it to return a number (like the dayOfWk() function). I already have tests to make sure that an invalid date cannot be entered. That should allow you to be able to make the program smaller.
Hmm, if you just want it to return a number, I can remove the stuff that displays the output.
Or do you want it to be displayed?
And then, why not as day?
But if you don't want that all, and I remove all the warning stuff, but keep the settings, the size becomes 0,8KB (809 bytes)

And you might use it, but I would prefer if you then mention me briefly in the readme or even just somewhere as note in the code of your program.

One thing that might be important though, is that I use several variables in the calculation, so I don't know if that can be a problem, but if so, I can change that, but that will increase the file size.
If I use a list for the settings, the size becomes 951 bytes
I just need the day to be returned as a number (1 for Sunday, 2 for Monday, etc.). The variables shouldn't be a problem as long as you don't use strings or L₁ and L₂.
Thank you for what you've done so far. I'll be sure to include you in the README.
Well, this formula gives a number from 0 to 6, with 0 for Saturday, 1, for Sunday....
Via the link: https://www.cemetech.net/sc/?hash=WdvYsmK/sY1l+GGq0D9uXRBN+o7C
You can find what I have now.
In the tab SMALLII
If you have anything I should change, just say it, and I'll work on it tomorrow.
(I am now directly going to sleep..)
Privacy_Dragon wrote:
Well, this formula gives a number from 0 to 6, with 0 for Saturday, 1, for Sunday....
Via the link: https://www.cemetech.net/sc/?hash=WdvYsmK/sY1l+GGq0D9uXRBN+o7C
You can find what I have now.
In the tab SMALLII
If you have anything I should change, just say it, and I'll work on it tomorrow.
(I am now directly going to sleep..)

Thank Privacy_Dragon! I'll look through this and see what is absolutely necessary to keep. Once again, I'll be sure to include you in the README.
I'm today going to upload the new versions of the day of week program to the archives!
It has big bugs fixed, like the bug of getting wrong days for Januari and Februari in the year the calendar changed...
And some other bugs, and it has the feature to see what current settings are!

Should I also upload a very basic and extra small BASIC version of 2KB?
I've now tried to make a github repository for the program!
That's easier if I find bugs that I can directly publish the new version, without having every week a new version...
Probably there won't be much new versions coming, but at least one bug will be fixed this week or next week, and if I then would again upload that new version to the file archives, I don't know if that's really appreciated...

So for that I made a github repository: https://github.com/PrivacyDragon/Day-of-Week-TI-84Plus-CE
Greetings
I just came across this post and I downloaded your BASIC program to calculate the day of the week..
To me you are making this overly complex. I thought I would contribute this code I wrote in the hopes it might be useful.

It will calculate the day of the week for any date from January 1, 4713 BCE (which is -4712, Jan 01) to any day in the future. It takes into account the calendar reform, the day after Oct 4, 1582 is Oct 15, 1582. If you enter any date between Oct 4 and 15, 1582 it will automatically adjust the date to Oct 4, 1582. Also, it assumes that the year preceding the year +1 is the year zero and the year preceding the year zero is -1. This is the way Astronomers count dates which is different from the way Historians count the years The year Historians call 585 BCE is actually the year -584.

The answers you will get are: 0=Sunday, 1=Monday... 6=Saturday. The weekday was not modified in any way by the Gregorian reform of the Julian calendar. In 1582 Oct 4 was on a Thursday and Oct 15 was on a Friday.

An interesting bit of trivia. Back then people believed that when you were born you were destined to died on a certain date at a certain time. So when the Pope said the the day after Oct 4 would be Oct 15 people rioted because they would now die 10 days sooner.


Code:
ClrHome
Disp "ENTER DATE AS"
Input "(MMDD:YYYY):",G
iPart(abs(G)/100)→M
iPart(abs(G)-M*100)→D
fPart(G)*10000→Y
If M≤2:Then
(Y-1)→Y
(M+12)→M
End
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
int(Y/100)→A
(2-A+int(A/4))→B
Else
0→B
End
remainder(int(365.25(Y+4716))+int(30.6001(M+1))+D+B-1523,7)→θ
Disp θ
Return
Well, I've now a 2KB small version, But I don't know if I should release that or not.
Nobody has reacted yet if I should upload that or not.
Privacy_Dragon wrote:
Well, I've now a 2KB small version, But I don't know if I should release that or not.
Nobody has reacted yet if I should upload that or not.

I think that you should do that. The less space the better.

@stbradley: Could I have a copy of that program to try out?
Also, I wouldn't trust any outcome for a date BC, since then they did not use the months as we know now.
And, @stbradley, what is on your version not what I really want, is the possibility to set it as you want.

RoccoLox Programs wrote:
I think that you should do that. The less space the better
Then I'll upload that as a 'Lite' version.
Greetings once again.

RoccoLox Programs: Please feel free to use it or modify it as you would like.

Privacy Dragon:
The version I posted is just meant to give an algorithm that will always correctly calculate the day of the week for pretty much any date you would need.

I was prompted to quickly write it yesterday afternoon because I noticed that you were having issues getting the correct day of the week for certain dates in your version so I thought I would try to help you out. When I ran your version yesterday and entered 10/23/2020 it said that it was THURSDAY and of course it should have said it was Friday.

I did not mean for this to be a complete program nor for it to replace your version but rather I wrote it so you could easily understand the algorithm and if you wanted to use it to feel free and do so otherwise you could just ignore it.
Well it's not that I have problems with displaying the correct date, I'm only finding invalid dates I have to work on every time. So that you can't input a wrong date.
And I'm not aware of a wrong date for yesterday...
When I try it I just get Friday out of it...
However, I found two other bugs...
And I've just finished getting the beta version of the program on Github!
If you go to the repository (https://github.com/PrivacyDragon/Day-of-Week-TI-84Plus-CE) you can find a branch called beta. That's the beta version.
There you can also find the 'lite' version!
(After that version is tested thoroughly I'll also upload it to the file archives here.)
Just a thought: Is there a way to make this program essentially replace the dayofwk( command by using it as a sub program and saving the output to a string/list? That would be a neat application.
  
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 2 of 3
» All times are UTC - 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

 

Advertisement