0 Members and 1 Guest are viewing this topic.
I cant edit the time, when i try to edit it the calculator crashes.
Thanks for the time
Quote from: Filipe97 on March 10, 2013, 05:57:42 pmI cant edit the time, when i try to edit it the calculator crashes.Hi,Did you update your Ndless to a revision greater than the one indicated in the README ?BTW, here is a message for everybody : nClock has some problems with daytime conversions, I'm aware of it but sadly have no time to solve it.Basically there are three conversions, one is accurate (timestamp to day) but the two others are not (guessing weekday and day to timestamp) due to a float approximation : this is why you may enter two more days when configuring the time and may have a wrong weekday. Sorry about that..
"Is Tues -1, Jan 1970 correct?" (Whereas the actual time was set to 1 Jan, 1970).
static short year_codes[] = {5, 4, 2, 0};static short month_codes[] = {0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5};static char months[][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};static char weekdays[][4] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};char * getWeekDay(int year, int month, int day) { int d = (year>>2)/25; int r = year - (d<<2)*25; return weekdays[(year_codes[d&3] + r + (r>>2) + ((r&3)==0) + month_codes[month-1] + day) % 7];}
Yep, you fixed it. Now the issue is that it says that today (21 May 2013) is a Monday (It's Tuesday).
I found out what might be causing all of these:
It crashes on start up on TI-nspire CX II CAS, the ndless dev says nClock needs to be updated.