
On 07 July 2005 09:59, Ashley Yakeley wrote:
In article
<3429668D0E777A499EE74A7952C382D103F41FAB@EUR-MSG-01.europe.corp.microso
ft.com>, "Simon Marlow"
wrote: The question is, what's the result of encodeUTC for an invalid CalendarTime. Does it roll over the out-of-range fields? What happens if you ask for Feb 29 in a non-leap year, for example?
Right now it's undefined. What should it do?
I'd say either it should be an error, or the date should be normalised to a valid date by carrying over any out-of-range values. We should have normalisation anyway, so that might be the easiest behaviour to provide. BTW, I think the library is great. As I said before, I'm a little concerned about how easy it is to do calendar calculations, but given the examples you posted earlier my worries might be unfounded. I think it would be great to collect these examples and put them in the documentation for System.Time.Calendar. Cheers, Simon
participants (1)
-
Simon Marlow