Re: Date and time arithmetic
- From: "Sam Hobbs" <samuel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 18 Apr 2005 08:41:54 -0700
Thank you for your time.
"Vic Sowers" <Mail@xxxxxxxxxxxxx> wrote in message
news:42635e4c$0$64582$a726171b@xxxxxxxxxxxxxxxxxx
>
> I did it this way:
> moonMins = 44+60*(12+24*29);
> Start.setMinutes(Start.getMinutes()+moonMins);
> and also got 9:18.
Yes, I first tried something similar; that is, I tried advancing by minutes.
Thank you for verifying that your results are similar to mine.
> Then I did the date math by hand and, indeed, 9:18 is correct.
>
> I concluded that, since the Earth has moved a bit during the intervening
> month, the new moon appears little earlier....
So I will now assume that the problem is not JScript or my use of it. I
seldom use JScript; the language I use primarily is C++ and for scripting I
primarily use VBScript. I chose JScript for this, for no particular reason.
Date and time arithmetic seems to be less convenient and less obvious for
JScript. I will try to implement this using VBScript and/or C++. I will post
results here when I have something useful.
.
- References:
- Date and time arithmetic
- From: Sam Hobbs
- Re: Date and time arithmetic
- From: Vic Sowers
- Date and time arithmetic
- Prev by Date: Re: Please reply asap ...
- Next by Date: help in conversion
- Previous by thread: Re: Date and time arithmetic
- Next by thread: Re: Date and time arithmetic
- Index(es):
Relevant Pages
|