On Sun, 10 Aug 2003, John Siracusa wrote: > On Sunday, August 10, 2003, at 04:12 PM, Joshua Hoblitt wrote: > >> Okay, so maybe a new constructor then? DateTime->localtime()? > >> Getting > >> the current local time seems more common than, say, constructing a > >> DateTime object from a day of the year, IMO :) > > > > We have enough constructors as it is. > > Well that's not my fault :) If, for whatever reason, you're going to > limit DateTime to N constructors, they should be the N most likely to > be used. Do you really think from_day_of_year() is going to be called > more often than now(time_zone => 'local')?
If you only have a year and day of year, then having a from_day_of_year constructor saves a _lot_ of calculation that end users have to do. OTOH, having to do 'DateTime->now(time_zone => "local")' isn't very onerous at all. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/