On Sun, 16 Feb 2003 11:58:52 -0800 Vlad Krupin <[EMAIL PROTECTED]> wrote:
> Looks interesting. A lot of functions though. Would it make sense to > at least remove all date_sub_* () functions in favor of using the > date_add_* () counterparts with negative values? E.g. > date_add_days(-10) does the same as date_sub_days(10) ? One of the > easy ways to reduce usability of an extension is to include a lot of > functions that do basic (and often overlapping) functions. This is better for the readability of the source, especially while working with dates or ranges. Internally two different functions are used. That sounds more logical to my mind to substract 10 days instead to add a negative span ;-). Note I have received request for a normalize add/sub method which accepts "1month 2days" or "-1year 4months", which can be added soon, as well as an OO interface. For the interface itself, I have made a merge of what we can find in others langages, like python or perl, I did not implement everything I found, but everything I currently need. One of the goals, except to enlarge the dates limit, was to provide usefull&easy to use functions. thank's for the feedback, pierre -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php