[Aimmath-developers] AutoConf*.mpl,Date.mpl,ManualConf.dist changes
Brought to you by:
gustav_delius,
npstrick
From: Greg G. <gr...@ma...> - 2004-04-11 08:11:40
|
Dear developers, Well 4th April came around and I got burnt again ... I was under the mistaken apprehension that the Summer Time bugs had been fixed. (I misread the meaning of the statement in this regard in ManualConfig.dist.) I suppose newDate.mpl was supposed to fix it, but it doesn't seem to be finished. I note that you guys in the Northern Hemisphere will be burnt at the other end because the date give for 2004 for the finish of Summer Time is 26th October which is a Tuesday. It's my belief that just doing a cvs update and doing read "AutoConf.mpl"; in maple, in AIM's .../WEB-INF/maple directory is all that's required to fix things. Anyway, I made changes to: AutoConf.mpl, AutoConfWin.mpl, Date.mpl and ManualConf.dist I'm not sure if there need to be compensatory changes in AutoConfWin.mws. Perhaps someone could check that. Anyway, the main change is the introduction of the variable `Date/SummerTimeSpec` with which one can set the Summer Time specification for one's locale without being defaulted to a possibly erroneous setting for the Northern Hemisphere. New functions added in Date.mpl are: `Date/DaysSince1Jan2000`, `Date/DayOfNthSundayOfMonth`, `Date/Test` Also, `Date/SummerTime` is now a function (rather than a table), that returns a list consisting of two month, day pairs which are the beginning and end dates of Summer Time for the locale, determined from `Date/SummerTimeSpec`. Finally, `Date/IsSummer` now takes account of whether there is no Summer Time, or whether the locale is in the Northern or Southern Hemisphere. To explain how it all fits together, let's consider the default `Date/SummerTimeSpec` which is [[4, 1], [10, 5]] which specifies that Summer Time goes from April's 1st Sunday, until October's 5th or last Sunday. Given a year, month and a Sunday ordinal, `Date/DayOfNthSundayOfMonth` returns a list specifying the day of the month on which the Sunday occurs, e.g. `Date/DayOfNthSundayOfMonth`(2004, 10, 5) returns [10, 31], i.e. the 5th(= last) Sunday of October occurs on the 31st of that month. Someone might like to check that Summer Time in the Northern Hemisphere does indeed finish on the 31st October this year. In any case, I feel confident that it doesn't finish on 26th October. A special case is the case we have here in Western Australia (no Summer Time at all), and this is specified by setting `Date/SummerTimeSpec` to [[0, 0], [0, 0]]. The possible values of `Date/SummerTimeSpec` that I know of (including various parts of Australia) are all listed in ManualConfig.dist. I'm quite probably the only Southern Hemisphere user currently, but conceivably this may change. Regards, Greg |