(12C) Full Moon - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (12C) Full Moon (/thread-9997.html) |
(12C) Full Moon - Gamo - 01-22-2018 06:30 AM This program compute the next date of full moon. Date format used D,MY (Day Month Year) Input any date range from 15 January 1900 through 25 November 4046 Example: "Make sure to set date format to g > D.MY" Today Date is 22.012018 press R/S Result is 31.01 next full moon is on January 31st To see full date digits: Press 0 > g > DATE Result in full is 31,01,2018 [3] 31 January 2018 on Wednesday 1=Monday 2=Tuesday 3=Wednesday to 7=Sunday Remark: Some month will be late or early by ± one day. Code:
Gamo RE: (12C) Full Moon - PedroLeiva - 01-22-2018 11:31 AM (01-22-2018 06:30 AM)Gamo Wrote: This program compute the date of full moon start from 15/01/1900Nice. How would the program be for the HP 35s calculator? Pedro RE: (12C) Full Moon - Dieter - 01-22-2018 01:27 PM (01-22-2018 11:31 AM)PedroLeiva Wrote: Nice. How would the program be for the HP 35s calculator? The 35s does not have date functions (ΔDAYS, DATE+). So the major part of such a program would consist of two routines that convert a Gregorian date to a Julian day number and vice versa. I have posted such a program in the General Software Library. The rest can be directly translated from the 12C program. So enter the linked program and then add this routine: Code: M001 LBL M You may also try this version: Code: M001 LBL M These routines should do the same calculation as the 12C program, but please do your own tests. ;-) For the given example it should return this: Code: 22,012018 [XEQ] M [ENTER] Does this work? Edit: at least for UTC the dates may be one day early here and there. Run the program a second time with the calculated date. If the output is the same as the input the full moon seems to be on the next day. Try 1,012018 and get 1,012018 again. Actually the full moon was on 2,012018 (but less than an hour past midnight UTC). For local time on the North and South American continent the error seems to be more evenly distributed. For UTC maybe line M011 in the first program should better be 2415036 (and line M013 in the second version changed to 1, respectively). But I haven't made any extensive tests. Dieter RE: (12C) Full Moon - PedroLeiva - 01-24-2018 12:10 AM (01-22-2018 01:27 PM)Dieter Wrote:Hi Dieter:(01-22-2018 11:31 AM)PedroLeiva Wrote: Nice. How would the program be for the HP 35s calculator? I got same results. Two comments: a) first time flag 0 was active and I got X=4,00 and Y= 16,022018. Then I cancel flag 0 and the results were as yours; b) to show year the display has to be on FIX6. With both LBL M routings I got same results In first case you doble step 10, so the total steps number are 16, not 15. Pedro RE: (12C) Full Moon - Dieter - 01-24-2018 08:15 AM (01-24-2018 12:10 AM)PedroLeiva Wrote: I got same results. Two comments: a) first time flag 0 was active and I got X=4,00 and Y= 16,022018. Then I cancel flag 0 and the results were as yours; Sure. If flag 0 is set the linked J program assumes a proleptic Julian calender. ;-) (01-24-2018 12:10 AM)PedroLeiva Wrote: b) to show year the display has to be on FIX6. It should be, yes. This also applies to other date programs using the mm.ddyyyy format. (01-24-2018 12:10 AM)PedroLeiva Wrote: With both LBL M routings I got same results In first case you doble step 10, so the total steps number are 16, not 15. Yes, step M010 appeared twice. I now have corrected this. Dieter RE: (12C) Full Moon - Dieter - 01-24-2018 08:25 AM (01-22-2018 06:30 AM)Gamo Wrote: Example: "Make sure to set date format to g > D.MY" Hint: if you replace 15,011900 with 10,101897 the program will work in either date mode. ;-) Dieter RE: (12C) Full Moon - Gamo - 01-25-2018 01:23 AM Thanks Dieter Now work on both DATE format. Gamo |