
----- Original Message ----- From: "Jeff Garland" <jeff@crystalclearsoftware.com>
conforming extractors/inserters for the duration/period classes? Specifically I am looking for io/string functions which can handle "Periods of Time, no Specific Start or End", which begin with a 'P' following a list of periods, e.g.
"P18Y9M4DT11H9M8S" (18 years, 9 months, 4 days, 11 hours, 9 minutes and 8 seconds)
I'm afraid the library doesn't currently offer an extraction of this sort of duration. The primary reason is that I (and others) have had difficulty dealing with the imprecise nature of a time duration that includes years and months. The problem is, what is the length of a duration such as '3 months'? The answer is, it depends on which day you want to measure it from and what rules you want to apply. So for representing durations you currently only have days, hours, minutes, and seconds.
Such functionality would come very handy at times, though. Say you want something to occur every first day of the month. You'd want a start date which is the first day of a month, and increase that date with one month to reach the next month. This is currently very difficult, because the next date has to be calculated manually. It would be nice if a duration of a month or a year was available, although comparing the length of a month and the length of 30 days would be quite impossible. best regards, Richard Peters