Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 12113

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Calendar 日历函数</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="函数参考"
HREF="funcref.html"><LINK
REL="PREVIOUS"
TITLE="bzwrite"
HREF="function.bzwrite.html"><LINK
REL="NEXT"
TITLE="cal_days_in_month"
HREF="function.cal-days-in-month.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="reference"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.bzwrite.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.cal-days-in-month.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="reference"
><A
NAME="ref.calendar"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
>X. Calendar 日历函数</H1
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN15764"
></A
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="calendar.intro"
>简介</A
></H1
><P
>&#13;    日历扩展是由一系列简单的日历格式转换函数组成。媒介或标准是基于儒略日计数(Julian
    Day Count)。儒略日计数是从公元前 4713
    年 1 月 1 日开始计算的。在不同的日历系统中转换,必须先将其转换为儒略日计数,然后转换为目标日历格式。儒略日计数与罗马儒略历(Julian
    Calendar)完全不同!更多关于儒略日计数的信息,请访问
    <A
HREF="http://www.hermetic.ch/cal_stud/jdn.htm"
TARGET="_top"
>http://www.hermetic.ch/cal_stud/jdn.htm</A
>。更多关于日历系统的信息,请访问
    <A
HREF="http://www.fourmilab.ch/documents/calendar/"
TARGET="_top"
>http://www.fourmilab.ch/documents/calendar/</A
>。从此页面引用的信息包含了这些介绍,在引号之内。
   </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="calendar.installation"
>安装</A
></H1
><P
>&#13;  要使用本类函数,需要在编译 PHP 时加上
  <CODE
CLASS="option"
>--enable-calendar</CODE
>。
 </P
><P
> <TT
CLASS="literal"
>PHP</TT
> 的 Windows
版本已经内置该扩展模块的支持。无需加载任何附加扩展库即可使用这些函数。</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="calendar.configuration"
>运行时配置</A
></H1
><P
>本扩展模块在 <TT
CLASS="filename"
>php.ini</TT
> 中未定义任何配置选项。</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="calendar.resources"
>资源类型</A
></H1
><P
>本扩展模块未定义任何资源类型。</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="calendar.constants"
>预定义常量</A
></H1
><P
>以下常量由本扩展模块定义,因此只有在本扩展模块被编译到
PHP 中,或者在运行时被动态加载后才有效。</P
><P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><TT
CLASS="constant"
><B
>CAL_GREGORIAN</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_JULIAN</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_JEWISH</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_FRENCH</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_NUM_CALS</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_DOW_DAYNO</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_DOW_SHORT</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_DOW_LONG</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_MONTH_GREGORIAN_SHORT</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_MONTH_GREGORIAN_LONG</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_MONTH_JULIAN_SHORT</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_MONTH_JULIAN_LONG</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_MONTH_JEWISH</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_MONTH_FRENCH</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
></DL
></DIV
><P
>&#13;  以下常量自 PHP 4.3.0 起可用:
 </P
><P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><TT
CLASS="constant"
><B
>CAL_EASTER_DEFAULT</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_EASTER_ROMAN</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_EASTER_ALWAYS_GREGORIAN</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_EASTER_ALWAYS_JULIAN</B
></TT
>
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
></DL
></DIV
><P
>&#13;  以下常量自 PHP 5.0.0 起可用:
 </P
><P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><TT
CLASS="constant"
><B
>CAL_JEWISH_ADD_ALAFIM_GERESH</B
></TT
>
     (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_JEWISH_ADD_ALAFIM</B
></TT
>
     (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>CAL_JEWISH_ADD_GERESHAYIM</B
></TT
>
     (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;
    </P
></DD
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>目录</B
></DT
><DT
><A
HREF="function.cal-days-in-month.html"
>cal_days_in_month</A
>&nbsp;--&nbsp;Return the number of days in a month for a given year and calendar</DT
><DT
><A
HREF="function.cal-from-jd.html"
>cal_from_jd</A
>&nbsp;--&nbsp;Converts from Julian Day Count to a supported calendar</DT
><DT
><A
HREF="function.cal-info.html"
>cal_info</A
>&nbsp;--&nbsp;Returns information about a particular calendar</DT
><DT
><A
HREF="function.cal-to-jd.html"
>cal_to_jd</A
>&nbsp;--&nbsp;Converts from a supported calendar to Julian Day Count</DT
><DT
><A
HREF="function.easter-date.html"
>easter_date</A
>&nbsp;--&nbsp;
     Get Unix timestamp for midnight on Easter of a given year
    </DT
><DT
><A
HREF="function.easter-days.html"
>easter_days</A
>&nbsp;--&nbsp;
     Get number of days after March 21 on which Easter falls for a
     given year
    </DT
><DT
><A
HREF="function.frenchtojd.html"
>FrenchToJD</A
>&nbsp;--&nbsp;
     Converts a date from the French Republican Calendar to a Julian
     Day Count
    </DT
><DT
><A
HREF="function.gregoriantojd.html"
>GregorianToJD</A
>&nbsp;--&nbsp;
     Converts a Gregorian date to Julian Day Count
    </DT
><DT
><A
HREF="function.jddayofweek.html"
>JDDayOfWeek</A
>&nbsp;--&nbsp;Returns the day of the week</DT
><DT
><A
HREF="function.jdmonthname.html"
>JDMonthName</A
>&nbsp;--&nbsp;Returns a month name</DT
><DT
><A
HREF="function.jdtofrench.html"
>JDToFrench</A
>&nbsp;--&nbsp;
     Converts a Julian Day Count to the French Republican Calendar
    </DT
><DT
><A
HREF="function.jdtogregorian.html"
>JDToGregorian</A
>&nbsp;--&nbsp;Converts Julian Day Count to Gregorian date</DT
><DT
><A
HREF="function.jdtojewish.html"
>jdtojewish</A
>&nbsp;--&nbsp;
     Converts a Julian day count to a Jewish calendar date
    </DT
><DT
><A
HREF="function.jdtojulian.html"
>JDToJulian</A
>&nbsp;--&nbsp;
     Converts a Julian Day Count to a Julian Calendar Date
    </DT
><DT
><A
HREF="function.jdtounix.html"
>jdtounix</A
>&nbsp;--&nbsp;Convert Julian Day to Unix timestamp</DT
><DT
><A
HREF="function.jewishtojd.html"
>JewishToJD</A
>&nbsp;--&nbsp;
     Converts a date in the Jewish Calendar to Julian Day Count
    </DT
><DT
><A
HREF="function.juliantojd.html"
>JulianToJD</A
>&nbsp;--&nbsp;
     Converts a Julian Calendar date to Julian Day Count
    </DT
><DT
><A
HREF="function.unixtojd.html"
>unixtojd</A
>&nbsp;--&nbsp;Convert Unix timestamp to Julian Day</DT
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.bzwrite.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.cal-days-in-month.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>bzwrite</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="funcref.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>cal_days_in_month</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>