From 9417ada4c2035946496c50c53721b5e7677f4320 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Fri, 11 May 2007 09:58:56 +0000 Subject: [PATCH] Implemented the new doc style, new entities, and rewording where appropriate git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@235409 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../calendar/functions/cal-days-in-month.xml | 54 +++++++- reference/calendar/functions/cal-from-jd.xml | 57 +++++++- reference/calendar/functions/cal-info.xml | 62 ++++++++- reference/calendar/functions/cal-to-jd.xml | 74 ++++++++++- reference/calendar/functions/easter-date.xml | 117 +++++++++++++---- reference/calendar/functions/easter-days.xml | 122 ++++++++++++----- reference/calendar/functions/frenchtojd.xml | 56 +++++++- .../calendar/functions/gregoriantojd.xml | 62 ++++++++- reference/calendar/functions/jddayofweek.xml | 124 +++++++++++++----- reference/calendar/functions/jdmonthname.xml | 39 +++++- reference/calendar/functions/jdtofrench.xml | 39 +++++- .../calendar/functions/jdtogregorian.xml | 39 +++++- reference/calendar/functions/jdtojewish.xml | 43 +++++- reference/calendar/functions/jdtojulian.xml | 40 +++++- reference/calendar/functions/jdtounix.xml | 38 +++++- reference/calendar/functions/jewishtojd.xml | 55 +++++++- reference/calendar/functions/juliantojd.xml | 55 +++++++- reference/calendar/functions/unixtojd.xml | 38 +++++- 18 files changed, 967 insertions(+), 147 deletions(-) diff --git a/reference/calendar/functions/cal-days-in-month.xml b/reference/calendar/functions/cal-days-in-month.xml index 4539ab22a6..42f906f25e 100644 --- a/reference/calendar/functions/cal-days-in-month.xml +++ b/reference/calendar/functions/cal-days-in-month.xml @@ -1,12 +1,13 @@ - + cal_days_in_month Return the number of days in a month for a given year and calendar - - Description + + + &reftitle.description; intcal_days_in_month intcalendar @@ -18,6 +19,49 @@ month of year for the specified calendar. + + + + &reftitle.parameters; + + + + calendar + + + Calendar to use for calculation + + + + + month + + + Month in the selected calendar + + + + + year + + + Year in the selected calendar + + + + + + + + + &reftitle.returnvalues; + + The length in days of the selected month in the given calendar + + + + + &reftitle.examples; <function>cal_days_in_month</function> example @@ -31,10 +75,8 @@ echo "There was $num days in August 2003"; - - See also jdtounix. - + + cal_from_jd Converts from Julian Day Count to a supported calendar - - Description + + + &reftitle.description; arraycal_from_jd intjd @@ -22,6 +23,43 @@ CAL_JEWISH and CAL_FRENCH. + + + + &reftitle.parameters; + + + + jd + + + Julian day as integer + + + + + calendar + + + Calendar to convert to + + + + + + + + + &reftitle.returnvalues; + + Returns an array containing calendar information like month, day, year, + day of week, abbreviated and full names of weekday and month and the + date in string form "month/day/year". + + + + + &reftitle.examples; <function>cal_from_jd</function> example @@ -52,8 +90,19 @@ Array + + + + &reftitle.seealso; - See also cal_to_jd. + + cal_to_jd + jdtofrench + jdtogregorian + jdtojewish + jdtojulian + jdtounix + diff --git a/reference/calendar/functions/cal-info.xml b/reference/calendar/functions/cal-info.xml index 4883006f32..3c634c5b9b 100644 --- a/reference/calendar/functions/cal-info.xml +++ b/reference/calendar/functions/cal-info.xml @@ -1,12 +1,13 @@ - + cal_info Returns information about a particular calendar - - Description + + + &reftitle.description; arraycal_info intcalendar @@ -46,9 +47,60 @@ If no calendar is specified information on all - supported calendars is returned as an array. This functionality - is available beginning with PHP 5. + supported calendars is returned as an array. + + + + &reftitle.parameters; + + + + calendar + + + Calendar to return information for. If no calendar is specified + information about all calendars is returned. + + + + + + + + + &reftitle.returnvalues; + + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + Since 5.0 + + The calendar parameter becomes optional + and defaults to "all calendars" if omitted. + + + + + + + + + + &reftitle.examples; <function>cal_info</function> example diff --git a/reference/calendar/functions/cal-to-jd.xml b/reference/calendar/functions/cal-to-jd.xml index 881fa28b3e..a2eefe0b95 100644 --- a/reference/calendar/functions/cal-to-jd.xml +++ b/reference/calendar/functions/cal-to-jd.xml @@ -1,12 +1,13 @@ - + cal_to_jd Converts from a supported calendar to Julian Day Count - - Description + + + &reftitle.description; intcal_to_jd intcalendar @@ -23,8 +24,73 @@ CAL_JEWISH and CAL_FRENCH. + + + + &reftitle.parameters; - See also cal_from_jd. + + + calendar + + + Calendar to convert from, one of + CAL_GREGORIAN, + CAL_JULIAN, + CAL_JEWISH or + CAL_FRENCH. + + + + + month + + + The month as a number, the valid range depends + on the calendar + + + + + day + + + The day as a number, the valid range depends + on the calendar + + + + + year + + + The year as a number, the valid range depends + on the calendar + + + + + + + + + &reftitle.returnvalues; + + A Julian Day number. + + + + + &reftitle.seealso; + + + cal_from_jd + frenchtojd + gregoriantojd + jewishtojd + juliantojd + unixtojd + diff --git a/reference/calendar/functions/easter-date.xml b/reference/calendar/functions/easter-date.xml index 5d56d9fa5c..d93ca09e9e 100644 --- a/reference/calendar/functions/easter-date.xml +++ b/reference/calendar/functions/easter-date.xml @@ -1,12 +1,13 @@ - + easter_date Get Unix timestamp for midnight on Easter of a given year - - Description + + + &reftitle.description; inteaster_date intyear @@ -15,27 +16,6 @@ Returns the Unix timestamp corresponding to midnight on Easter of the given year. - - Since PHP 4.3.0, the year - parameter is optional and defaults to the current year according to the - localtime if omitted. - - - - <function>easter_date</function> example - - -]]> - - - This function will generate a warning if the year is outside @@ -61,9 +41,94 @@ echo date("M-d-Y", easter_date(2001)); // Apr-15-2001 (The code is based on a C program by Simon Kershaw, <webmaster at ely.anglican dot org>) + + + + &reftitle.parameters; - See easter_days for calculating Easter - before 1970 or after 2037. + + + year + + + The year as a number between 1970 an 2037 + + + + + + + + + &reftitle.returnvalues; + + The easter date as a unix timestamp. + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + Since 4.3.0 + + The year parameter is optional and defaults + to the current year according to the local time if omitted. + + + + + + + + + + &reftitle.examples; + + + <function>easter_date</function> example + + +]]> + + + + + + + &reftitle.seealso; + + + + easter_days for calculating Easter + before 1970 or after 2037 + + + + + + + &reftitle.seealso; + + + easter_days + diff --git a/reference/calendar/functions/easter-days.xml b/reference/calendar/functions/easter-days.xml index 4e38f46ffa..8aad0a1fbd 100644 --- a/reference/calendar/functions/easter-days.xml +++ b/reference/calendar/functions/easter-days.xml @@ -1,12 +1,13 @@ - + easter_days Get number of days after March 21 on which Easter falls for a given year - - Description + + + &reftitle.description; inteaster_days intyear @@ -17,38 +18,11 @@ for a given year. If no year is specified, the current year is assumed. - - Since PHP 4.3.0, the year - parameter is optional and defaults to the current year according to the - localtime if omitted. - - - The method parameter was also introduced in - PHP 4.3.0 and allows to calculate easter dates based - on the Gregorian calendar during the years 1582 - 1752 when set to - CAL_EASTER_ROMAN. See the calendar constants for more valid - constants. - This function can be used instead of easter_date to calculate Easter for years which fall outside the range of Unix timestamps (i.e. before 1970 or after 2037). - - <function>easter_days</function> example - - -]]> - - The date of Easter Day was defined by the Council of Nicaea in @@ -69,8 +43,94 @@ echo easter_days(1913); // 2, i.e. March 23 (The code is based on a C program by Simon Kershaw, <webmaster at ely.anglican dot org>) + + + + &reftitle.parameters; - See also easter_date. + + + year + + + The year as a number between 1970 an 2037 + + + + + + + + + &reftitle.returnvalues; + + The number of days after March 21st that the Easter Sunday + is in the given year. + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + Since 4.3.0 + + The year parameter is optional and defaults + to the current year according to the local time if omitted. + + + + Since 4.3.0 + + The method parameter was introduced + and allows to calculate easter dates based + on the Gregorian calendar during the years 1582 - 1752 when set to + CAL_EASTER_ROMAN. See the calendar constants for more valid + constants. + + + + + + + + + + &reftitle.examples; + + + <function>easter_days</function> example + + +]]> + + + + + + + &reftitle.seealso; + + + easter_date + diff --git a/reference/calendar/functions/frenchtojd.xml b/reference/calendar/functions/frenchtojd.xml index 7ee2305f86..415aaea236 100644 --- a/reference/calendar/functions/frenchtojd.xml +++ b/reference/calendar/functions/frenchtojd.xml @@ -1,12 +1,13 @@ - + FrenchToJD Converts a date from the French Republican Calendar to a Julian Day Count - - Description + + + &reftitle.description; intfrenchtojd intmonth @@ -24,6 +25,55 @@ use. + + + &reftitle.parameters; + + + + month + + + The month as a number from 1 (for Vendémiaire) to 13 (for the period of 5-6 days at the end of each year) + + + + + day + + + The day as a number from 1 to 30 + + + + + year + + + The year as a number between 1 and 14 + + + + + + + + + &reftitle.returnvalues; + + The julian day for the given french revolution date as an integer. + + + + + &reftitle.seealso; + + + jdtofrench + cal_to_jd + + + + GregorianToJD Converts a Gregorian date to Julian Day Count - - Description + + + &reftitle.description; intgregoriantojd intmonth @@ -23,6 +24,51 @@ later. For example, Britain converted in 1752, The USSR in 1918 and Greece in 1923. Most European countries used the Julian calendar prior to the Gregorian. + + + + + &reftitle.parameters; + + + + month + + + The month as a number from 1 (for January) to 12 (for December) + + + + + day + + + The day as a number from 1 to 31 + + + + + year + + + The year as a number between -4714 and 9999 + + + + + + + + + &reftitle.returnvalues; + + The julian day for the given gregorian date as an integer. + + + + + &reftitle.examples; + Calendar functions @@ -38,6 +84,16 @@ echo "$gregorian\n"; + + + &reftitle.seealso; + + + jdtogregorian + cal_to_jd + + + + JDDayOfWeek Returns the day of the week - - Description + + + &reftitle.description; mixedjddayofweek intjulianday @@ -15,39 +16,90 @@ Returns the day of the week. Can return a string or an integer depending on the mode. - - Calendar week modes - - - - Mode - Meaning - - - - - 0 (Default) - - Returns the day number as an int (0=Sunday, 1=Monday, etc) - - - - 1 - - Returns string containing the day of week - (English-Gregorian) - - - - 2 - - Returns a string containing the abbreviated day of week - (English-Gregorian) - - - - -
+
+
+ + + &reftitle.parameters; + + + + julianday + + + A julian day number as integer + + + + + mode + + + Calendar week modes + + + + Mode + Meaning + + + + + 0 (Default) + + Return the day number as an int (0=Sunday, 1=Monday, etc) + + + + 1 + + Returns string containing the day of week + (English-Gregorian) + + + + 2 + + Return a string containing the abbreviated day of week + (English-Gregorian) + + + + +
+
+
+
+
+
+ + + &reftitle.returnvalues; + + The french revolution date as a string in the form "month/day/year" + + + + + &reftitle.parameters; + + + + julianday + + + A julian day number as integer + + + + + + + + + &reftitle.returnvalues; + + The gregorian weekday as either an integer or string.
diff --git a/reference/calendar/functions/jdmonthname.xml b/reference/calendar/functions/jdmonthname.xml index 30da6bcb03..5f76530657 100644 --- a/reference/calendar/functions/jdmonthname.xml +++ b/reference/calendar/functions/jdmonthname.xml @@ -1,12 +1,13 @@ - + JDMonthName Returns a month name - - Description + + + &reftitle.description; stringjdmonthname intjulianday @@ -63,6 +64,38 @@ + + + &reftitle.parameters; + + + + jday + + + The Julian Day to operate on + + + + + calendar + + + The calendar to take the month name from + + + + + + + + + &reftitle.returnvalues; + + The month name for the given Julian Day and calendar. + + + + JDToFrench Converts a Julian Day Count to the French Republican Calendar - - Description + + &reftitle.description; stringjdtofrench intjuliandaycount @@ -15,6 +15,39 @@ Converts a Julian Day Count to the French Republican Calendar. + + + &reftitle.parameters; + + + + julianday + + + A julian day number as integer + + + + + + + + + &reftitle.returnvalues; + + The french revolution date as a string in the form "month/day/year" + + + + + &reftitle.seealso; + + + frenchtojd + cal_from_jd + + + + JDToGregorian Converts Julian Day Count to Gregorian date - - Description + + &reftitle.description; stringjdtogregorian intjulianday @@ -16,6 +16,39 @@ date in the format of "month/day/year". + + + &reftitle.parameters; + + + + julianday + + + A julian day number as integer + + + + + + + + + &reftitle.returnvalues; + + The gregorian date as a string in the form "month/day/year" + + + + + &reftitle.seealso; + + + gregoriantojd + cal_from_jd + + + + jdtojewish Converts a Julian day count to a Jewish calendar date - - Description + + &reftitle.description; stringjdtojewish intjuliandaycount @@ -28,6 +28,33 @@ CAL_JEWISH_ADD_ALAFIM, CAL_JEWISH_ADD_GERESHAYIM. + + + + &reftitle.parameters; + + + + julianday + + + A julian day number as integer + + + + + + + + + &reftitle.returnvalues; + + The julian date as a string in the form "month/day/year" + + + + + &reftitle.examples; <function>jdtojewish</function> Example @@ -42,6 +69,16 @@ echo jdtojewish(gregoriantojd(10, 8, 2002), true, + + + &reftitle.seealso; + + + jewishtojd + cal_from_jd + + + diff --git a/reference/calendar/functions/jdtojulian.xml b/reference/calendar/functions/jdtojulian.xml index 4cfe1898d9..2c9a847983 100644 --- a/reference/calendar/functions/jdtojulian.xml +++ b/reference/calendar/functions/jdtojulian.xml @@ -1,12 +1,13 @@ - + JDToJulian Converts a Julian Day Count to a Julian Calendar Date - - Description + + + &reftitle.description; stringjdtojulian intjulianday @@ -16,6 +17,39 @@ Calendar Date in the format of "month/day/year". + + + &reftitle.parameters; + + + + julianday + + + A julian day number as integer + + + + + + + + + &reftitle.returnvalues; + + The julian date as a string in the form "month/day/year" + + + + + &reftitle.seealso; + + + juliantojd + cal_from_jd + + + + jdtounix Convert Julian Day to Unix timestamp - - Description + + + &reftitle.description; intjdtounix intjday @@ -19,8 +20,37 @@ jday <= 2465342 ). The time returned is localtime (and not GMT). + + + + &reftitle.parameters; - See also unixtojd. + + + jday + + + A julian day number between 2440588 and 2465342. + + + + + + + + + &reftitle.returnvalues; + + The unix timestamp for the start of the given julian day. + + + + + &reftitle.seealso; + + + unixtojd + diff --git a/reference/calendar/functions/jewishtojd.xml b/reference/calendar/functions/jewishtojd.xml index 4358005cbc..a46b9c3733 100644 --- a/reference/calendar/functions/jewishtojd.xml +++ b/reference/calendar/functions/jewishtojd.xml @@ -1,12 +1,12 @@ - + JewishToJD Converts a date in the Jewish Calendar to Julian Day Count - - Description + + &reftitle.description; intjewishtojd intmonth @@ -21,6 +21,55 @@ when the new moon was first observed. + + + &reftitle.parameters; + + + + month + + + The month as a number from 1 to 13 + + + + + day + + + The day as a number from 1 to 30 + + + + + year + + + The year as a number between 1 and 9999 + + + + + + + + + &reftitle.returnvalues; + + The julian day for the given jewish date as an integer. + + + + + &reftitle.seealso; + + + jdtojewish + cal_to_jd + + + + JulianToJD Converts a Julian Calendar date to Julian Day Count - - Description + + &reftitle.description; intjuliantojd intmonth @@ -32,6 +32,55 @@ + + + &reftitle.parameters; + + + + month + + + The month as a number from 1 (for January) to 12 (for December) + + + + + day + + + The day as a number from 1 to 31 + + + + + year + + + The year as a number between -4713 and 9999 + + + + + + + + + &reftitle.returnvalues; + + The julian day for the given julian date as an integer. + + + + + &reftitle.seealso; + + + jdtojulian + cal_to_jd + + + + unixtojd Convert Unix timestamp to Julian Day - - Description + + + &reftitle.description; intunixtojd inttimestamp @@ -16,8 +17,37 @@ (seconds since 1.1.1970), or for the current day if no timestamp is given. + + + + &reftitle.parameters; - See also jdtounix. + + + timestamp + + + A unix timestamp to convert. + + + + + + + + + &reftitle.returnvalues; + + A julian day number as integer. + + + + + &reftitle.seealso; + + + jdtounix +