CVS update: php3/functions
| From: | zeev | Date: | Tue, 22 Sep 1998 14:34:08 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1386@lists.php.net to get a copy of this message | ||
Date: Tuesday September 22, 1998 @ 10:34
Author: zeev
Update of /repository/php3/functions
In directory asf:/u2/tmp/cvs-serv12678/functions
Modified Files:
datetime.c
Log Message:
Add 'j' support to date()
Index: php3/functions/datetime.c
diff -c php3/functions/datetime.c:1.42 php3/functions/datetime.c:1.43
*** php3/functions/datetime.c:1.42 Tue Sep 22 10:26:07 1998
--- php3/functions/datetime.c Tue Sep 22 10:34:07 1998
***************
*** 30,36 ****
*/
! /* $Id: datetime.c,v 1.42 1998/09/22 14:26:07 rasmus Exp $ */
#ifdef THREAD_SAFE
--- 30,36 ----
*/
! /* $Id: datetime.c,v 1.43 1998/09/22 14:34:07 zeev Exp $ */
#ifdef THREAD_SAFE
***************
*** 207,212 ****
--- 207,213 ----
case 'y': /* year, numeric, 2 digits */
case 'm': /* month, numeric */
case 'd': /* day of the month, numeric */
+ case 'j': /* day of the month, numeric, no leading zeros */
case 'H': /* hour, numeric, 24 hour format */
case 'h': /* hour, numeric, 12 hour format */
case 'i': /* minutes, numeric */
***************
*** 275,280 ****
--- 276,285 ----
break;
case 'd': /* day of the month, numeric */
sprintf(tmp_buff, "%02d", ta->tm_mday); /* SAFE */
+ strcat(return_value->value.str.val, tmp_buff);
+ break;
+ case 'j':
+ sprintf(tmp_buff, "%d", ta->tm_mday); /* SAFE */
strcat(return_value->value.str.val, tmp_buff);
break;
case 'H': /* hour, numeric, 24 hour format */
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net