01-18-2008, 10:25 AM
|
#2 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
Hi mate,
One of the things I've always wanted to see in a date class is a method to compare two dates and return an array of date parts showing the difference.
Also your date() method looks like it can take multiple date formats so it would be handy if you write an add() / sub() method to add or remove to a date.
For example
PHP Code:
<?php
$newDate = $pDateTime->date('1st February 2008')->add('month', 3);
$newDate = $pDateTime->date('2008-05-26')->sub('day', 20);
If I think of any more I'll let you know.
Alan
|
|
|