tal             Wed Nov 27 10:52:26 2002 EDT

  Modified files:              
    /php4/ext/calendar  calendar.c 
  Log:
  
  Added an additional (optional) argument to jdtojewish() to keep BC
  with 4.3 (and let users getdates in Hebrew without further formatting)
  
  
Index: php4/ext/calendar/calendar.c
diff -u php4/ext/calendar/calendar.c:1.32 php4/ext/calendar/calendar.c:1.33
--- php4/ext/calendar/calendar.c:1.32   Tue Nov 26 09:52:00 2002
+++ php4/ext/calendar/calendar.c        Wed Nov 27 10:52:25 2002
@@ -18,7 +18,7 @@
    |          Wez Furlong               <[EMAIL PROTECTED]>            |
    +----------------------------------------------------------------------+
  */
-/* $Id: calendar.c,v 1.32 2002/11/26 14:52:00 wez Exp $ */
+/* $Id: calendar.c,v 1.33 2002/11/27 15:52:25 tal Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -456,20 +456,21 @@
 }
 /* }}} */
 
-/* {{{ proto string jdtojewish(int juliandaycount [, int fl])
+/* {{{ proto string jdtojewish(int juliandaycount [, bool hebrew [, int fl]])
    Converts a julian day count to a jewish calendar date */
 PHP_FUNCTION(jdtojewish)
 {
        long julday, fl = 0;
+       zend_bool heb   = 0;
        int year, month, day;
        char date[10], hebdate[25];
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &julday, &fl) == 
FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|bl", &julday, &heb, 
+&fl) == FAILURE) {
                RETURN_FALSE;
        }
 
        SdnToJewish(julday, &year, &month, &day);
-       if (!fl) {
+       if (!heb) {
                sprintf(date, "%i/%i/%i", month, day, year);
                RETURN_STRING(date, 1);
        } else {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to