On 7/16/03 2:16 PM, Eugene van der Pijll wrote: > Most of the formatting modules don't know what to do with infinite dates.
That's a bug/feature in the formatting modules, IMO, not a reason to pretend that infinite dates don't exist. > Similarly, most of the programs using DT won't use infinite dates. It is a > pain to check for infinity everywhere. ...and yet you must do so anyway if you write subroutines that accept DateTime objects, but that want to reject infinite dates. >> I don't think infinity needs to be locale aware. "Inf" will not be locale >> aware in Perl 6, AFAIK, for example. > > Perl 6 is for programmers. I thought you needed the DT::F::Simple module > for user input. Programmers are users too :) In this situation, you can think of it as a shorter constructor for brief/simple scripts (since the arguments to DateTime->new() are very verbose). This was another one of the motivators for DT::F::Simple, if you look back at the thread. > If English users try to submit the string "infinite" in a web form (I doubt > it, but hypothetically...), Dutch users would certainly type "oneindig". I'm not really "against" localization in this case. I think "natural language" is outside the scope of DT::F::Simple. Simple things like "now" and "today" should get parsed, but not "right now" or "the day after yesterday" :) I'm just not sure how cleanly "infinity" will localize. And since it is a mathematical concept as well as a regular word (and probably used in the former context more often), I don't think it would be the end of the world if it wasn't localized. That's all I'm saying. -John
