Date and time arithmetic



How to advance a date and time by 29 days, 12 hours and 44 minutes? That
period of time is a lunar month; see:
http://encarta.msn.com/encyclopedia_761573665/Moon.html

The last new moon was April 8 at 20:34 UTC and the next new moon will be May
8 at 8:48 UTC; see:
http://sunearth.gsfc.nasa.gov/eclipse/phase/phases.1999-2010.html

I have tried a variety of ways to do the calculation. I have searched this
newsgroup and I have looked at J R Stockton's pages; see:
http://www.merlyn.demon.co.uk/js-dates.htm

The code below is my last attempt. This works, except the time is about a
half hour too far. I assume the result should be 08:48:00 UTC but I get
09:18:00 UTC.

var Start
Start = new Date(Date.UTC(2005, 3, 8, 20, 34));
WScript.echo(Start.toUTCString());
with (Start) {
setDate(getDate()+29);
setHours(getHours()+12);
setMinutes(getMinutes()+44);
}
WScript.echo(Start.toUTCString());



My results are:

Fri, 8 Apr 2005 20:34:00 UTC
Sun, 8 May 2005 09:18:00 UTC


.



Relevant Pages

  • MOON - Feb 24,07
    ... Moon - 0h UTC ... cent long trmntr: E 9.278 deg ... Abenezra, Azophi/ Lib favors S limb: Mutus, ... Quadrature at 07:57:06 UTC ...
    (sci.astro.amateur)
  • MOON / Vesta, Apr 2, 07
    ... illum: 99.7% ... Features: Full Moon @ 10:10:37 UTC ...
    (sci.astro.amateur)
  • Re: Date and time arithmetic
    ... > period of time is a lunar month; ... > The last new moon was April 8 at 20:34 UTC and the next new moon will be ... I assume the result should be 08:48:00 UTC but I get ... Prev by Date: ...
    (microsoft.public.scripting.jscript)
  • Re: HAARP Test tonight?
    ... Bloody maths failed me on UTC conversion moon rise at 1739 AEDT which is 0639 UTC, 20 min before the tests finished!!!!!!. ... Regarding the moon, hmmm it has been high in the sky very early in the night several days back, so its possible the moon was visible, however its been raining hear for past 48 hrs and have major cloud cover, so I can't visually confirm. ... Based on http://www.ga.gov.au/bin/astro/moonrisenset it says for South Canberra it should rise 1739 AEDT which was 0439 UTC. ... Location: Canberra Australia ...
    (rec.radio.shortwave)
  • Re: Meeus Calculator
    ... had a quick leaf through the RASC Observer's Handbook. ... Sunset ... UTC in the winter, and 0400 UTC in the summer, ... The best candidates for 2007 are 3 March with the full moon at ...
    (sci.astro.amateur)

Loading