On Fri, 24 Jan 2003, Bruce Van Allen wrote: > Some of the discussion was about whether or not DateTime objects should > be updatable at all. It appeared to me that consensus formed to have > objects static, and updating would be done via cloning: > > $dt = DateTime->new( year => 2001, month => 5, day => 22 ); > > $dt2 = $dt->clone( day => 24 );
I wouldn't say there was consensus ;) As I said previously, it's appealing from an _implementor's_ standpoint, and very logical, but I'm not sure that it actually makes for an API. At the moment, I'm leaning towards making the object mutable, either via: $dt->day(6); _or_ by just having one mutator sub: $dt->set( day => 6, hour => 7 ); -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/