CVS update: php3/functions

From: Date: Mon, 07 Jun 1999 15:43:24 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-6656@lists.php.net to get a copy of this message
Date: Monday June 7, 1999 @ 11:43 Author: cmv Update of /repository/php3/functions In directory php:/tmp/cvs-serv25025/functions Modified Files: datetime.c Log Message: added more date() flags ... Index: php3/functions/datetime.c diff -u php3/functions/datetime.c:1.53 php3/functions/datetime.c:1.54 --- php3/functions/datetime.c:1.53 Wed Jun 2 19:53:17 1999 +++ php3/functions/datetime.c Mon Jun 7 11:43:23 1999 @@ -30,7 +30,7 @@ */ -/* $Id: datetime.c,v 1.53 1999/06/02 23:53:17 cmv Exp $ */ +/* $Id: datetime.c,v 1.54 1999/06/07 15:43:23 cmv Exp $ */ #ifdef THREAD_SAFE @@ -317,6 +317,9 @@ case 'l': /* day (of the week), textual */ size += 9; break; + case 'Z': /* timezone offset in seconds */ + size += 6; + break; case 'Y': /* year, numeric, 4 digits */ size += 4; break; @@ -345,6 +348,7 @@ i++; } case 'w': /* day of the week, numeric */ + case 'L': /* boolean for leap year */ default: size++; break; @@ -467,6 +471,14 @@ break; case 't': /* days in current month */ sprintf(tmp_buff, "%2d", phpday_tab[isleap(ta->tm_year)][ta->tm_mon] ); + strcat(return_value->value.str.val, tmp_buff); + break; + case 'Z': /* timezone offset in seconds */ + sprintf(tmp_buff, "%d", ta->tm_gmtoff ); + strcat(return_value->value.str.val, tmp_buff); + break; + case 'L': /* boolean for leapyear */ + sprintf(tmp_buff, "%d", isleap(ta->tm_year) ? 1 : 0 ); strcat(return_value->value.str.val, tmp_buff); break; default:

« previous php.dev (#6656) next »