On Sunday, January 12, 2003, at 11:42 PM, Matt Sergeant wrote: > Parsing should not be in a base date time class though - it has no > place > there. It should *return* a base date time object, but putting > generators in > the same class doesn't make sense to me. I suppose you could look at > them as > constructors, but I'd disagree with that. A constructor should > instantiate > an object via the simplest means possible. Everything else should go > in an > external class (and if you like that class can inject methods into the > base > class, but no date parsing whatsoever should go into the base class > IMHO). I disagree. I think that some very fundamental parsing needs to go into the base class. You should be able to construct a DateTime object for whatever date and time you need, and to do that, it has to be able to parse a date/time argument. But nothing fancy, just a few formats should be supported in the base class, including epoch time, ICal, and maybe ISO 8601. Other than that, I agree that all other date parsing should go into another module. Regards, David -- David Wheeler AIM: dwTheory david@wheeler.net ICQ: 15726394 http://david.wheeler.net/ Yahoo!: dew7e Jabber: Theory@jabber.orgThread Previous | Thread Next