From: Peter L. <pet...@te...> - 2009-01-18 18:27:03
|
Doug, > I'm definitely not an expert in the date parser, but I did just make some > changes there. I don't think that there are "invalid dates". It looks like > any date in one calendar can be translated into any date in another, but I > could be wrong. My intention was to allow input of only valid dates for "Swedish Calendar period", like 1712-02-30.. > You could make sure that a date doesn't end up mapping to a non-date or > force it inside the range when you convert, but you may lose information > that way. For example, if a year in Gregorian maps to a Swedish 1699 and > you "force" it to something else, then you won't be able to go back to the > proper Gregorian date. I think I can manage to covert to/from sdn as there is always a Julian/Gregorian date that maps to/from a Swedish date. The difference is only 1 day. > If it doesn't exist, perhaps we need some "semantic" date error checking. > I think that there is a bug in the tracker because we crazy years, like > 22323235235, which are syntactically correct, but not semantic or > meaningfully correct (unless, as Benny pointer out, you are writing > science fiction :) But that would be a new feature, I think. (It's a bug I reported. I have used that locally, so if that string consists of 8 digits like yyyymmdd and mm and dd are valid months and dates I put to "-" in the string and continue. This is very useful for me when I copy and paste dates from some applications that show dates like yyyymmdd.) /Peter |