On Mon, Jan 13, 2003 at 10:07:05AM -0800, David Wheeler wrote: > 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. > 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, This is not an argument for doing parsing in the base object. You can create a DateTime object for whatever date you want without any parsing: DateTime->new (jd => 10, jsec => 3600); or DateTime->new (year => 1, month => 2, monthday => 3); > and to do that, it has to be able to > parse a date/time argument. Parsing just means turning a string into a set of arguments that the DateTime object understands. > But nothing fancy, just a few formats should be supported in the > base class, including epoch time, ICal, and maybe ISO 8601. I wouldn't call epoch arguments parsing, but I would really like it if this wasn't in the base class. Making people go through extra steps to use epoch is a good thing, which will hopefully make them think about using it a bit more. MartijnThread Previous | Thread Next