cvs: pecl /date t_date.c

From: Date: Fri, 09 Jan 2004 13:37:26 +0000
Subject: cvs: pecl /date t_date.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-699@lists.php.net to get a copy of this message
pajoye Fri Jan 9 08:37:26 2004 EDT Modified files: /pecl/date t_date.c Log: - fix add/sub days months where the offset<0 (return the result of the counter operator) Index: pecl/date/t_date.c diff -u pecl/date/t_date.c:1.4 pecl/date/t_date.c:1.5 --- pecl/date/t_date.c:1.4 Thu Jan 8 11:44:38 2004 +++ pecl/date/t_date.c Fri Jan 9 08:37:26 2004 @@ -15,7 +15,7 @@ | Author: Pierre-Alain Joye <paj@pearfr.org | +----------------------------------------------------------------------+ - $Id: t_date.c,v 1.4 2004/01/08 16:44:38 iliaa Exp $ + $Id: t_date.c,v 1.5 2004/01/09 13:37:26 pajoye Exp $ */ #ifdef PHP_WIN32 @@ -425,7 +425,7 @@ date_update_julian(d); } if (days < 0) { - date_add_days(d,-days); + return date_add_days(d,-days); } date_return_val_if_failed(d->julian_days>days, DATE_FALSE); d->julian_days -= days; @@ -452,7 +452,7 @@ date_return_val_if_failed(d->status > 0, DATE_FALSE); if (nmonths < 0) { - date_sub_months(d, -nmonths); + return date_sub_months(d, -nmonths); } date_return_val_if_failed(d != NULL, DATE_FALSE ); date_return_val_if_failed(date_valid(d), DATE_FALSE ); @@ -493,7 +493,7 @@ date_return_val_if_failed(d->status > 0, DATE_FALSE); if (nmonths < 0) { - date_add_months(d, -nmonths); + return date_add_months(d, -nmonths); } date_return_val_if_failed(d != NULL, DATE_FALSE ); date_return_val_if_failed(date_valid(d), DATE_FALSE );

« previous php.pecl.cvs (#699) next »