reference/calendar/functions/jdtojewish.xml
1ae151672a7ce10bd096505deac85ff198a62ef5
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.jdtojewish">
3
+
<refentry xml:id="function.jdtojewish" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>jdtojewish</refname>
6
6
<refpurpose>Converts a Julian day count to a Jewish calendar date</refpurpose>
...
...
@@ -9,9 +9,9 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>string</type><methodname>jdtojewish</methodname>
12
-
<methodparam><type>int</type><parameter>juliandaycount</parameter></methodparam>
13
-
<methodparam choice="opt"><type>bool</type><parameter>hebrew</parameter><initializer>false</initializer></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter>fl</parameter><initializer>0</initializer></methodparam>
12
+
<methodparam><type>int</type><parameter>julian_day</parameter></methodparam>
13
+
<methodparam choice="opt"><type>bool</type><parameter>hebrew</parameter><initializer>&false;</initializer></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Converts a Julian Day Count to the Jewish Calendar.
...
...
@@ -23,7 +23,7 @@
23
23
<para>
24
24
<variablelist>
25
25
<varlistentry>
26
-
<term><parameter>julianday</parameter></term>
26
+
<term><parameter>julian_day</parameter></term>
27
27
<listitem>
28
28
<para>
29
29
A julian day number as integer
...
...
@@ -35,18 +35,18 @@
35
35
<listitem>
36
36
<para>
37
37
If the <parameter>hebrew</parameter> parameter is set to &true;, the
38
-
<parameter>fl</parameter> parameter is used for Hebrew, string based,
38
+
<parameter>flags</parameter> parameter is used for Hebrew, ISO-8859-8 encoded string based,
39
39
output format.
40
40
</para>
41
41
</listitem>
42
42
</varlistentry>
43
43
<varlistentry>
44
-
<term><parameter>fl</parameter></term>
44
+
<term><parameter>flags</parameter></term>
45
45
<listitem>
46
46
<para>
47
-
The available formats are:
47
+
A bitmask which may consist of
48
48
<constant>CAL_JEWISH_ADD_ALAFIM_GERESH</constant>,
49
-
<constant>CAL_JEWISH_ADD_ALAFIM</constant>,
49
+
<constant>CAL_JEWISH_ADD_ALAFIM</constant> and
50
50
<constant>CAL_JEWISH_ADD_GERESHAYIM</constant>.
51
51
</para>
52
52
</listitem>
...
...
@@ -58,7 +58,9 @@
58
58
<refsect1 role="returnvalues">
59
59
&reftitle.returnvalues;
60
60
<para>
61
-
The jewish date as a string in the form "month/day/year"
61
+
The Jewish date as a string in the form "month/day/year", or an ISO-8859-8
62
+
encoded Hebrew date string, according to the <parameter>hebrew</parameter>
63
+
parameter.
62
64
</para>
63
65
</refsect1>
64
66

...
...
@@ -70,11 +72,23 @@
70
72
<programlisting role="php">
71
73
<![CDATA[
72
74
<?php
73
-
echo jdtojewish(gregoriantojd(10, 8, 2002), true,
74
-
CAL_JEWISH_ADD_GERESHAYIM + CAL_JEWISH_ADD_ALAFIM + CAL_JEWISH_ADD_ALAFIM_GERESH);
75
+
$jd = gregoriantojd(10, 8, 2002);
76
+
echo jdtojewish($jd, true), PHP_EOL,
77
+
jdtojewish($jd, true, CAL_JEWISH_ADD_GERESHAYIM), PHP_EOL,
78
+
jdtojewish($jd, true, CAL_JEWISH_ADD_ALAFIM), PHP_EOL,
79
+
jdtojewish($jd, true,CAL_JEWISH_ADD_ALAFIM_GERESH), PHP_EOL;
75
80
?>
76
81
]]>
77
82
</programlisting>
83
+
&example.outputs;
84
+
<screen>
85
+
<![CDATA[
86
+
ב חשון התשסג
87
+
ב' חשון התשס"ג
88
+
ב חשון ה אלפים תשסג
89
+
ב חשון ה'תשסג
90
+
]]>
91
+
</screen>
78
92
</example>
79
93
</para>
80
94
</refsect1>
...
...
@@ -89,8 +103,6 @@ echo jdtojewish(gregoriantojd(10, 8, 2002), true,
89
103
</para>
90
104
</refsect1>
91
105
</refentry>
92
-

93
-

94
106
<!-- Keep this comment at the end of the file
95
107
Local variables:
96
108
mode: sgml
97
109