Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

?>


value jddayofweek(integer julian_day, integer mode)


The jddayofweek function returns either an integer or a string, depending on the mode.
Modes are listed in Table 11.5.


<?
$jdc = gregoriantojd(1,1,1);
print(jddayofweek($jdc, 1));
?>


Table 11.5. Calendar Day Modes
Mode Description
0 Return the day of the week as a number from zero to 6, zero being Sunday.


1 Return the day of the week as a naGregorian calendar. me using the English name from the


2 Returns the abbreviated name of the day of the week using the English name
from the Gregorian calendar.


string jdmonthname(integer julian_day, integer mode)


The jdmonthname function returns the name of the month for a particular day. The mode
argument specifies which calendar to draw month names from. Modes are listed in Table
11.6.


<?
$jdc = gregoriantojd(1,1,1800);
print(jdmonthname($jdc, 0). "
\n");
print(jdmonthname($jdc, 1). "
\n");
print(jdmonthname($jdc, 2). "
\n");
print(jdmonthname($jdc, 3). "
\n");
print(jdmonthname($jdc, 4). "
\n");
print(jdmonthname($jdc, 5). "
\n");
?>


string jdtofrench(integer julian_day)


The jdtofrench function returns the date on the French Republican calendar for a Julian
Day Count.


<?
$jdc = gregoriantojd(1,1,1800);

Free download pdf