On Wednesday 14 November 2007 10:32:04 Derick Rethans wrote: > Hello! > > On Mon, 12 Nov 2007, Thomas Koch wrote: > > Those two classes are not complicate at all, but are really handy and fun > > to use once you have them and especially if work with booking data as we > > do. There are many more good ideas at the joda project that can be > > included in stage 2, e.g. Partial: Times that are not fully defined, e.g. > > dates without daytime. > > I actually think that PHP's datetime support itself provide this > functionality. I don't think it's such a good to implement all of this > in PHP, especially because of 32/64 bit issues. > > regards, > Derick
I just added another useful functionality to our DateTime class: ::getNow( DateTimeZone $tz ), ::$fakedNow. We had an error on our website, which occured only outside of office time. So to write a testcase for this error, I had to simulate another time then the current one. I did this by replacing $dt = new OurDateTime('now', $tz); with $dt = OurDateTime::getNow($tz); getNow() returns a OurDateTime object representing 'now' until you've not set OurDateTime::$fakedNow to another time. I consider it useful... Cheers, -- Thomas Koch Software Entwickler -------------------------------- www.billiger-mietwagen.de TourWerk GmbH Alter Markt 36-42 50667 Köln HRB: 7144 (Amtsgericht Freiburg) Geschäftsführer: Christian Mahnke Tel. +49221 272 408 18 Fax. +49221 272 408 29 -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components