If you are generalizing the Julian functions to account for time of
day, you might also want to account for time zone and/or longitude.
********************************************************
* William Carlisle Thacker *
* *
* Atlantic Oceanographic and Meteorological Laboratory *
* 4301 Rickenbacker Causeway *
* Miami, Florida 33149 USA *
* Office: (305) 361-4323 *
* Fax: (305) 361-4392 *
********************************************************
On Tue, 30 May 2000, Winnie Lambert wrote:
>
> Guy,
>
> My understanding of the Julian calender is that it is used to calculate day
> numbers only without regard to time of day. Therefore, you are correct in
> saying the the julian() fuction does not have a bug. MS Excel has a
> function like you describe, in which fractions of a day represent the time
> of day. Your comments on "where the 0.25 comes from" are rather cryptic to
> me. Did you find a function in S-PLUS that behaves the same way as your
> application and that in Excel? I am going to need a function like that and
> was going to attempt to build one, unless you or anyone else can tell me
> that one exists. Anyone?
>
> Win Lambert
>
> P.S. For an interesting discussion on the history and function of the
> Julian and Gregorian calendars, refer to The Bulletin of the American
> Meteorological Society, Volume 81 No. 1, January 2000, pp 69-74, "Calendars
> and Software" by Jon E. Ahlquist. Your company or university library should
> be able to get a copy for you if they don't have the journal.
>
>
> -----Original Message-----
> From: Guy Nason [mailto:G.P.Nason@bristol.ac.uk]
> Sent: Tuesday, May 30, 2000 1:40 PM
> To: s-news
> Subject: [S] Interesting behaviour of month.day.year
>
>
> Hello,
>
> The following behaviour was achieved with S-Plus 4.5 Release 2 running
> on Windows 98.
>
> #
> # First create a Julian date for 31st March 2000
> #
>
> jd <- julian(m=3, d=31, y=2000)
> jd
> # [1] 14700
> #
> # The function month.day.year works correctly on this
> #
> month.day.year(14700)
> #$month:
> #[1] 3
> #
> #$day:
> #[1] 31
> #
> #$year:
> #[1] 2000
> #
> # Now how about 14700.3
> #
> month.day.year(14700.3)
> #$month:
> #[1] 4
> #
> #$day:
> #[1] 1
> #
> #$year:
> #[1] 2000
> #
> Note that the month has changed to APRIL! This probably IS NOT a bug
> since I should think the dates functions are only defined for integers.
> However, I've been writing an application that uses decimal days for
> hours. So my "practical" interpretation is that 14700.3 is 0.3 of the
> way through 31st March 2000.
>
> S-Plus refers to some original code to Becker, Chambers and Wilks (1988)
> which is present in the examples() library. I think I can see where the
> 0.25 comes from (in the first multiplication by 4).
>
> Any comments,
> Guy
>
> ps: I did check through the archive but didn't see anything on this.
> Probably nobody is crazy enough to do this....
>
>
>
>
> -----------------------------------------------------------------------
> This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
> send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
> message: unsubscribe s-news
>
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|