didou Sat Aug 16 11:51:16 2003 EDT
Modified files:
/phpdoc/en/reference/calendar/functions cal-days-in-month.xml
cal-from-jd.xml
Log:
added 2 examples
Index: phpdoc/en/reference/calendar/functions/cal-days-in-month.xml
diff -u phpdoc/en/reference/calendar/functions/cal-days-in-month.xml:1.2
phpdoc/en/reference/calendar/functions/cal-days-in-month.xml:1.3
--- phpdoc/en/reference/calendar/functions/cal-days-in-month.xml:1.2 Wed Apr 17
02:36:36 2002
+++ phpdoc/en/reference/calendar/functions/cal-days-in-month.xml Sat Aug 16
11:51:16 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/calendar.xml, last change in rev 1.19 -->
<refentry id="function.cal-days-in-month">
<refnamediv>
@@ -18,6 +18,19 @@
This function will return the number of days in the
<parameter>month</parameter> of <parameter>year</parameter> for
the specified <parameter>calendar</parameter>.
+ </para>
+ <para>
+ <example>
+ <title><function>cal_days_in_month</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$num = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31
+echo "There was $num days in August 2003";
+?>
+]]>
+ </programlisting>
+ </example>
</para>
<para>
See also <function>jdtounix</function>.
Index: phpdoc/en/reference/calendar/functions/cal-from-jd.xml
diff -u phpdoc/en/reference/calendar/functions/cal-from-jd.xml:1.4
phpdoc/en/reference/calendar/functions/cal-from-jd.xml:1.5
--- phpdoc/en/reference/calendar/functions/cal-from-jd.xml:1.4 Tue Mar 11 12:43:56
2003
+++ phpdoc/en/reference/calendar/functions/cal-from-jd.xml Sat Aug 16 11:51:16
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/calendar.xml, last change in rev 1.19 -->
<refentry id='function.cal-from-jd'>
<refnamediv>
@@ -22,6 +22,38 @@
<constant>CAL_JULIAN</constant>,
<constant>CAL_JEWISH</constant> and
<constant>CAL_FRENCH</constant>.
+ </para>
+ <para>
+ <example>
+ <title><function>cal_from_jd</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$today = unixtojd(mktime(0, 0, 0, 8, 16, 2003));
+print_r(cal_from_jd($today, CAL_GREGORIAN));
+?>
+]]>
+ </programlisting>
+ <para>
+ This will output :
+ </para>
+ <screen>
+<![CDATA[
+Array
+(
+ [date] => 8/16/2003
+ [month] => 8
+ [day] => 16
+ [year] => 2003
+ [dow] => 6
+ [abbrevdayname] => Sat
+ [dayname] => Saturday
+ [abbrevmonth] => Aug
+ [monthname] => August
+)
+]]>
+ </screen>
+ </example>
</para>
<para>
See also <function>cal_to_jd</function>.
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php