CVS update: php3/dl/calendar

From: Date: Mon, 04 Jan 1999 19:08:25 +0000
Subject: CVS update: php3/dl/calendar
Groups: php.dev 
Request: Send a blank email to php-dev+get-3255@lists.php.net to get a copy of this message
Date: Monday January 4, 1999 @ 14:08 Author: shane Update of /repository/php3/dl/calendar In directory asf:/u/temp/cvs-serv10041 Modified Files: calendar.c Log Message: prototypes for calendar functions Index: php3/dl/calendar/calendar.c diff -c php3/dl/calendar/calendar.c:1.15 php3/dl/calendar/calendar.c:1.16 *** php3/dl/calendar/calendar.c:1.15 Mon Dec 28 04:34:47 1998 --- php3/dl/calendar/calendar.c Mon Jan 4 14:08:24 1999 *************** *** 3,9 **** * code by Shane Caraveo shane@caraveo.com * copy freely! * ! * $Id: calendar.c,v 1.15 1998/12/28 09:34:47 sas Exp $ */ --- 3,9 ---- * code by Shane Caraveo shane@caraveo.com * copy freely! * ! * $Id: calendar.c,v 1.16 1999/01/04 19:08:24 shane Exp $ */ *************** *** 39,44 **** --- 39,46 ---- DLEXPORT php3_module_entry *get_module(void) { return &calendar_module_entry; } #endif + /* {{{ proto string jdtogregorian(int juliandaycount) + convert a julian day count to a gregorian calendar date. returns string. */ DLEXPORT void cal_jdtogreg(INTERNAL_FUNCTION_PARAMETERS) { pval *julday; *************** *** 60,65 **** --- 62,69 ---- } + /* {{{ proto int gregoriantojd(int month, int day, int year) + convert a gregorian calendar date to julian day count. */ DLEXPORT void cal_gregtojd(INTERNAL_FUNCTION_PARAMETERS) { pval *year, *month, *day; *************** *** 80,85 **** --- 84,91 ---- } + /* {{{ proto string jdtojulian(int juliandaycount) + convert a julian day count to a julian calendar date. returns string. */ DLEXPORT void cal_jdtojul(INTERNAL_FUNCTION_PARAMETERS) { pval *julday; *************** *** 101,106 **** --- 107,114 ---- } + /* {{{ proto int juliantojd(int month, int day, int year) + convert a julian calendar date to julian day count.*/ DLEXPORT void cal_jultojd(INTERNAL_FUNCTION_PARAMETERS) { pval *year, *month, *day; *************** *** 121,126 **** --- 129,136 ---- } + /* {{{ proto string jdtojewish(int juliandaycount) + convert a julian day count to a jewish calendar date. returns string. */ DLEXPORT void cal_jdtojewish(INTERNAL_FUNCTION_PARAMETERS) { pval *julday; *************** *** 142,147 **** --- 152,159 ---- } + /* {{{ proto int jewishtojd(int month, int day, int year) + convert a jewish calendar date to a julian day count*/ DLEXPORT void cal_jewishtojd(INTERNAL_FUNCTION_PARAMETERS) { pval *year, *month, *day; *************** *** 162,167 **** --- 174,181 ---- } + /* {{{ proto string jdtofrench(int juliandaycount) + convert a julian day count to a french republic calendar date. returns string. */ DLEXPORT void cal_jdtofrench(INTERNAL_FUNCTION_PARAMETERS) { pval *julday; *************** *** 183,188 **** --- 197,204 ---- } + /* {{{ proto int frenchtojd(int month, int day, int year) + convert a french republic calendar date to julian day count */ DLEXPORT void cal_frenchtojd(INTERNAL_FUNCTION_PARAMETERS) { pval *year, *month, *day; *************** *** 203,208 **** --- 219,226 ---- } + /* {{{ proto mixed jddayofweek(int juliandaycount, int mode) + returns name or number of day of week from julian day count. */ DLEXPORT void cal_jddayofweek(INTERNAL_FUNCTION_PARAMETERS) { pval *julday, *mode; *************** *** 244,249 **** --- 262,269 ---- } + /* {{{ proto string jdmonthname(int juliandaycount, int mode) + returns name of month for julian day count. */ DLEXPORT void cal_monthname(INTERNAL_FUNCTION_PARAMETERS) { pval *julday, *mode; *************** *** 255,264 **** convert_to_long(mode); switch (mode->value.lval) { - case 0L: /* gregorian or julian month */ - SdnToGregorian(julday->value.lval, &year, &month, &day); - monthname = MonthNameShort[month]; - break; case 1L: /* gregorian or julian month */ SdnToGregorian(julday->value.lval, &year, &month, &day); monthname = MonthNameLong[month]; --- 275,280 ---- *************** *** 280,286 **** monthname = FrenchMonthName[month]; break; default: /* default gregorian */ ! /* FIXME - need to set monthname to something here ?? */ break; } return_value->value.str.val = estrdup(monthname); --- 296,303 ---- monthname = FrenchMonthName[month]; break; default: /* default gregorian */ ! SdnToGregorian(julday->value.lval, &year, &month, &day); ! monthname = MonthNameShort[month]; break; } return_value->value.str.val = estrdup(monthname); -- 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

« previous php.dev (#3255) next »