Date Functions
|
01-15-2015, 07:49 PM
(This post was last modified: 01-16-2015 06:45 AM by Dieter.)
Post: #9
|
|||
|
|||
RE: Date Functions
(01-15-2015 03:35 PM)Wolfgang Wrote: @Thomas and Dieter: You're welcome. May I suggest a bit of streamlining of your program collection that would vastly reduce its size? You could write a unified Julian day number routine that would handle all possible cases so that the same formula (the one with 365.25 and 30.6001) would not have to appear numerous times in slighty different versions. In the end all possible calculations boil down to conversions between day/month/year and Julian day numbers. Additional routines could split input (nd values) into day, month and year. What do you think? Checking for invalid dates during the switchover period in October 1582 can be handled in various ways. The most straightforward way could be coded in PASCAL like this: Code: if (frac(nd)=0.101582) and (int(nd) >= 5) and (int(nd) <= 14) then The DT2DN (Date to Day Number) routine uses a special way of determining the day of year for a given date. Why don't you simply evaluate the difference between this date and 1 January (plus 1) ?-) Finally, since the program uses English dialogues, English names for the Easter-related holidays would make sense. Maybe users from various parts of the world can say which Easter-related holidays are important to them, e.g. Pentecost, Ascension Thursday etc. Dieter |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Date Functions - Thomas_Sch - 05-08-2014, 12:49 PM
RE: Date Functions - Wolfgang - 09-19-2014, 05:55 PM
RE: Date Functions - Wolfgang - 01-14-2015, 10:17 PM
RE: Date Functions - ww63 - 01-15-2015, 08:16 AM
RE: Date Functions - Dieter - 01-15-2015, 01:21 PM
RE: Date Functions - Thomas_Sch - 01-15-2015, 08:35 AM
RE: Date Functions - ww63 - 01-15-2015, 08:38 AM
RE: Date Functions - Wolfgang - 01-15-2015, 03:35 PM
RE: Date Functions - Dieter - 01-15-2015 07:49 PM
RE: Date Functions - Wolfgang - 01-15-2015, 10:37 PM
RE: Date Functions - Dieter - 01-16-2015, 08:40 AM
RE: Date Functions - Dieter - 01-18-2015, 06:25 PM
RE: Date Functions - salvomic - 04-09-2015, 03:03 PM
RE: Date Functions - Wolfgang - 01-19-2015, 04:47 PM
RE: Date Functions - Dieter - 01-19-2015, 08:25 PM
RE: Date Functions - Wolfgang - 04-10-2015, 06:38 PM
RE: Date Functions - salvomic - 04-10-2015, 07:27 PM
RE: Date Functions - Wolfgang - 04-13-2015, 10:03 PM
RE: Date Functions - salvomic - 04-13-2015, 10:17 PM
RE: Date Functions - Wolfgang - 04-13-2015, 10:50 PM
RE: Date Functions - salvomic - 04-14-2015, 05:17 AM
RE: Date Functions - Thomas_Sch - 04-14-2015, 07:10 AM
RE: Date Functions - salvomic - 04-14-2015, 08:21 AM
RE: Date Functions - salvomic - 04-23-2016, 04:48 PM
RE: Date Functions - ggauny@live.fr - 07-05-2016, 07:42 AM
RE: Date Functions - ggauny@live.fr - 07-05-2016, 07:53 AM
|
User(s) browsing this thread: 1 Guest(s)