The leap years, month and days are fixed. Please let me know if you find any mistake on this.
Is there any way now to test the leap year?
Apart from that i have found the attached file for the PICKIT2. Do you have any reference on that?Code:arraywrite ndays,13,NDAY,[0,31,28,31,30,31,30,31,31,30,31,30,31] if ((year//4 = 0) and (year//400 != 0)) then 'check the leap year ndays[2] = 29 'then February has 29 days else ndays[2] = 28 'else has 28 days endif hh = hh + 3 'the Hour from GPS is UTC so for our country in Greece we add +3 if hh>23 then 'if the hh+3 hour is greater than 23 (23:00) then day = day + 1 'we check the day added is true hh = hh//24 'but the hour not exceed the 24 so go to 00:00 if (day > ndays[month]) then month = month + 1 day = 1 if (month > 12) then year = year + 1 month = 1 endif endif endif NDAY: ndays[0] = 0 ndays[1] = 31 'January ndays[2] = 28 'February ndays[3] = 31 'March ndays[4] = 30 'April ndays[5] = 31 'May ndays[6] = 30 'June ndays[7] = 31 'July ndays[8] = 31 'August ndays[9] = 30 'September ndays[10] = 31 'October ndays[11] = 30 'November ndays[12] = 31 'December




Bookmarks