[GENERIC] Zend_Translate:
[zend.git] / documentation / manual / ja / module_specs / Zend_Date-Constants.xml
blobf7d9b10d14abfc95f089531fbe5b32d15ad82595
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <!-- EN-Revision: 20115 -->
4 <sect1 id="zend.date.constants">
6     <title>日付関数全般用の定数</title>
8     <para>
9         <classname>Zend_Date</classname> のメソッドでパラメータ <varname>$parts</varname>
10         を持つものはすべて、以下の定数のいずれかをパラメータとして指定できます。
11         これにより、日付の中の特定の要素や使用する書式
12         (例: <acronym>RFC</acronym> 822) を指定します。
13     </para>
15     <sect2 id="zend.date.constants.using">
17         <title>定数の使用</title>
19         <para>
20             たとえば、定数<constant>Zend_Date::HOUR</constant> の使用法は次のようになります。
21             曜日・時・分・秒・その他の要素が世界各地でさまざまな形式で表されていたとしても、
22             オブジェクトのタイムゾーン設定を使用して自動的に正しい値で計算を行います。
23             これは、内部のタイムスタンプの値が何であるかや
24             ユーザが世界中のどこにいるかとは関係がありません。
25             使用する単位にかかわらず、出力結果は <acronym>GMT</acronym> あるいは <acronym>UTC</acronym>
26             あるいはロケールにあわせて地域化された形式となります。
27             以下の出力サンプルは、
28             Europe/GMT+1 (ドイツ、オーストリア、フランスなど)
29             にあわせて地域化された形式です。
30         </para>
32         <table id="zend.date.constants.using.table">
33             <title>Zend_Date::HOUR を使用した操作</title>
34             <tgroup cols="4">
35                 <thead>
36                     <row>
37                         <entry>メソッド</entry>
38                         <entry>説明</entry>
39                         <entry>元の日付</entry>
40                         <entry>結果</entry>
41                     </row>
42                 </thead>
43                 <tbody>
44                     <row>
45                         <entry><methodname>get(Zend_Date::HOUR)</methodname></entry>
46                         <entry>時間を出力する</entry>
47                         <entry>2009-02-13T14:53:27+01:00</entry>
48                         <entry>14</entry>
49                     </row>
50                     <row>
51                         <entry><methodname>set(12, Zend_Date::HOUR)</methodname></entry>
52                         <entry>新しい時間を設定する</entry>
53                         <entry>2009-02-13T14:53:27+01:00</entry>
54                         <entry>2009-02-13T12:53:27+01:00</entry>
55                     </row>
56                     <row>
57                         <entry><methodname>add(12, Zend_Date::HOUR)</methodname></entry>
58                         <entry>時間を足す</entry>
59                         <entry>2009-02-13T14:53:27+01:00</entry>
60                         <entry>2009-02-14T02:53:27+01:00</entry>
61                     </row>
62                     <row>
63                         <entry><methodname>sub(12, Zend_Date::HOUR)</methodname></entry>
64                         <entry>時間を引く</entry>
65                         <entry>2009-02-13T14:53:27+01:00</entry>
66                         <entry>2009-02-13T02:53:27+01:00</entry>
67                     </row>
68                     <row>
69                         <entry><methodname>compare(12, Zend_Date::HOUR)</methodname></entry>
70                         <entry>時間を比較し、0 か 1 あるいは -1 を返す</entry>
71                         <entry>2009-02-13T14:53:27+01:00</entry>
72                         <entry>1 (オブジェクト > 引数 の場合)</entry>
73                     </row>
74                     <row>
75                         <entry><methodname>copy(Zend_Date::HOUR)</methodname></entry>
76                         <entry>時間部のみをコピーする</entry>
77                         <entry>2009-02-13T14:53:27+01:00</entry>
78                         <entry>1970-01-01T14:00:00+01:00</entry>
79                     </row>
80                     <row>
81                         <entry><methodname>equals(14, Zend_Date::HOUR)</methodname></entry>
82                         <entry>時間を比較し、<constant>TRUE</constant> あるいは <constant>FALSE</constant> を返す</entry>
83                         <entry>2009-02-13T14:53:27+01:00</entry>
84                         <entry><constant>TRUE</constant></entry>
85                     </row>
86                     <row>
87                         <entry><methodname>isEarlier(12, Zend_Date::HOUR)</methodname></entry>
88                         <entry>時間を比較し、<constant>TRUE</constant> あるいは <constant>FALSE</constant> を返す</entry>
89                         <entry>2009-02-13T14:53:27+01:00</entry>
90                         <entry><constant>TRUE</constant></entry>
91                     </row>
92                     <row>
93                         <entry><methodname>isLater(12, Zend_Date::HOUR)</methodname></entry>
94                         <entry>時間を比較し、<constant>TRUE</constant> あるいは <constant>FALSE</constant> を返す</entry>
95                         <entry>2009-02-13T14:53:27+01:00</entry>
96                         <entry><constant>FALSE</constant></entry>
97                     </row>
98                 </tbody>
99             </tgroup>
100         </table>
102     </sect2>
104     <sect2 id="zend.date.constants.list">
106         <title>全定数の一覧</title>
108         <para>
109             日付/時刻の各要素に対応する定数が <classname>Zend_Date</classname> で定義されています。
110             <classname>Zend_Date</classname> がサポートするすべての定数を以下に示します。
111         </para>
113         <table id="zend.date.constants.list.table-1">
114             <title>日に関する定数</title>
115             <tgroup cols="4">
116                 <thead>
117                     <row>
118                         <entry>定数</entry>
119                         <entry>説明</entry>
120                         <entry>日付</entry>
121                         <entry>結果</entry>
122                     </row>
123                 </thead>
124                 <tbody>
125                     <row>
126                         <entry><constant>Zend_Date::DAY</constant></entry>
127                         <entry>日 (二桁の数値)</entry>
128                         <entry>2009-02-13T14:53:27+01:00</entry>
129                         <entry>
130                             <emphasis>13</emphasis>
131                         </entry>
132                     </row>
133                     <row>
134                         <entry><constant>Zend_Date::DAY_SHORT</constant></entry>
135                         <entry>日 (一桁あるいは二桁の数値)</entry>
136                         <entry>2009-02-13T14:53:27+01:00</entry>
137                         <entry>
138                             <emphasis>6</emphasis>
139                         </entry>
140                     </row>
141                     <row>
142                         <entry><constant>Zend_Date::WEEKDAY</constant></entry>
143                         <entry>曜日 (地域化された完全な曜日名)</entry>
144                         <entry>2009-02-13T14:53:27+01:00</entry>
145                         <entry><emphasis>Friday</emphasis>
146                         </entry>
147                     </row>
148                     <row>
149                         <entry><constant>Zend_Date::WEEKDAY_SHORT</constant></entry>
150                         <entry>曜日 (地域化された曜日名の短縮形。三文字)</entry>
151                         <entry>2009-02-13T14:53:27+01:00</entry>
152                         <entry><emphasis>Fri</emphasis> が金曜日を表す</entry>
153                     </row>
154                     <row>
155                         <entry><constant>Zend_Date::WEEKDAY_NAME</constant></entry>
156                         <entry>曜日 (地域化された曜日名の短縮形。二文字)</entry>
157                         <entry>2009-02-13T14:53:27+01:00</entry>
158                         <entry><emphasis>Fr</emphasis> が金曜日を表す</entry>
159                     </row>
160                     <row>
161                         <entry><constant>Zend_Date::WEEKDAY_NARROW</constant></entry>
162                         <entry>曜日 (地域化された曜日名の短縮形。一文字)</entry>
163                         <entry>2009-02-13T14:53:27+01:00</entry>
164                         <entry><emphasis>F</emphasis> が金曜日を表す</entry>
165                     </row>
166                     <row>
167                         <entry><constant>Zend_Date::WEEKDAY_DIGIT</constant></entry>
168                         <entry>曜日 (0 = 日曜日, 6 = 土曜日)</entry>
169                         <entry>2009-02-13T14:53:27+01:00</entry>
170                         <entry><emphasis>5</emphasis> が金曜日を表す</entry>
171                     </row>
172                     <row>
173                         <entry><constant>Zend_Date::WEEKDAY_8601</constant></entry>
174                         <entry><acronym>ISO</acronym> 8601 にもとづく曜日 (1 = 月曜日, 7 = 日曜日)</entry>
175                         <entry>2009-02-13T14:53:27+01:00</entry>
176                         <entry><emphasis>5</emphasis> が金曜日を表す</entry>
177                     </row>
178                     <row>
179                         <entry><constant>Zend_Date::DAY_OF_YEAR</constant></entry>
180                         <entry>日数 (一桁あるいは二桁の数値)</entry>
181                         <entry>2009-02-13T14:53:27+01:00</entry>
182                         <entry><emphasis>43</emphasis>
183                         </entry>
184                     </row>
185                     <row>
186                         <entry><constant>Zend_Date::DAY_SUFFIX</constant></entry>
187                         <entry>英語で日付の後に追加する文字 (st, nd, rd, th)</entry>
188                         <entry>2009-02-13T14:53:27+01:00</entry>
189                         <entry><emphasis>th</emphasis>
190                         </entry>
191                     </row>
192                 </tbody>
193             </tgroup>
194         </table>
196         <table id="zend.date.constants.list.table-2">
197             <title>週に関する定数</title>
198             <tgroup cols="4">
199                 <thead>
200                     <row>
201                         <entry>定数</entry>
202                         <entry>説明</entry>
203                         <entry>日付</entry>
204                         <entry>結果</entry>
205                     </row>
206                 </thead>
207                 <tbody>
208                     <row>
209                         <entry><constant>Zend_Date::WEEK</constant></entry>
210                         <entry>週 (1 から 53 までの数値)</entry>
211                         <entry>2009-02-13T14:53:27+01:00</entry>
212                         <entry><emphasis>7</emphasis>
213                         </entry>
214                     </row>
215                 </tbody>
216             </tgroup>
217         </table>
219         <table id="zend.date.constants.list.table-3">
220             <title>月に関する定数</title>
221             <tgroup cols="4">
222                 <thead>
223                     <row>
224                         <entry>定数</entry>
225                         <entry>説明</entry>
226                         <entry>日付</entry>
227                         <entry>結果</entry>
228                     </row>
229                 </thead>
230                 <tbody>
231                     <row>
232                         <entry><constant>Zend_Date::MONTH_NAME</constant></entry>
233                         <entry>月 (地域化された完全な月名)</entry>
234                         <entry>2009-02-13T14:53:27+01:00</entry>
235                         <entry><emphasis>February</emphasis>
236                         </entry>
237                     </row>
238                     <row>
239                         <entry><constant>Zend_Date::MONTH_NAME_SHORT</constant></entry>
240                         <entry>月 (地域化された月名の短縮形。三文字)</entry>
241                         <entry>2009-02-13T14:53:27+01:00</entry>
242                         <entry><emphasis>Feb</emphasis>
243                         </entry>
244                     </row>
245                     <row>
246                         <entry><constant>Zend_Date::MONTH_NAME_NARROW</constant></entry>
247                         <entry>月 (地域化された月名の短縮形。一文字)</entry>
248                         <entry>2009-02-13T14:53:27+01:00</entry>
249                         <entry><emphasis>F</emphasis>
250                         </entry>
251                     </row>
252                     <row>
253                         <entry><constant>Zend_Date::MONTH</constant></entry>
254                         <entry>月 (二桁の月番号)</entry>
255                         <entry>2009-02-13T14:53:27+01:00</entry>
256                         <entry><emphasis>02</emphasis></entry>
257                     </row>
258                     <row>
259                         <entry><constant>Zend_Date::MONTH_SHORT</constant></entry>
260                         <entry>月 (一桁あるいは二桁の月番号)</entry>
261                         <entry>2009-02-13T14:53:27+01:00</entry>
262                         <entry><emphasis>2</emphasis></entry>
263                     </row>
264                     <row>
265                         <entry><constant>Zend_Date::MONTH_DAYS</constant></entry>
266                         <entry>当月の日数 (数値)</entry>
267                         <entry>2009-02-13T14:53:27+01:00</entry>
268                         <entry><emphasis>28</emphasis>
269                         </entry>
270                     </row>
271                 </tbody>
272             </tgroup>
273         </table>
275         <table id="zend.date.constants.list.table-4">
276             <title>年に関する定数</title>
277             <tgroup cols="4">
278                 <thead>
279                     <row>
280                         <entry>定数</entry>
281                         <entry>説明</entry>
282                         <entry>日付</entry>
283                         <entry>結果</entry>
284                     </row>
285                 </thead>
286                 <tbody>
287                     <row>
288                         <entry><constant>Zend_Date::YEAR</constant></entry>
289                         <entry>年 (数値)</entry>
290                         <entry>2009-02-13T14:53:27+01:00</entry>
291                         <entry><emphasis>2009</emphasis></entry>
292                     </row>
293                     <row>
294                         <entry><constant>Zend_Date::YEAR_8601</constant></entry>
295                         <entry><acronym>ISO</acronym> 8601 の年 (数値)</entry>
296                         <entry>2009-02-13T14:53:27+01:00</entry>
297                         <entry><emphasis>2009</emphasis>
298                         </entry>
299                     </row>
300                     <row>
301                         <entry><constant>Zend_Date::YEAR_SHORT</constant></entry>
302                         <entry>年 (二桁の数値)</entry>
303                         <entry>2009-02-13T14:53:27+01:00</entry>
304                         <entry><emphasis>09</emphasis></entry>
305                     </row>
306                     <row>
307                         <entry><constant>Zend_Date::YEAR_SHORT_8601</constant></entry>
308                         <entry><acronym>ISO</acronym> 8601 の年 (二桁の数値)</entry>
309                         <entry>2009-02-13T14:53:27+01:00</entry>
310                         <entry><emphasis>09</emphasis>
311                         </entry>
312                     </row>
313                     <row>
314                         <entry><constant>Zend_Date::LEAPYEAR</constant></entry>
315                         <entry>今年がうるう年かどうか? (<constant>TRUE</constant> あるいは <constant>FALSE</constant>)</entry>
316                         <entry>2009-02-13T14:53:27+01:00</entry>
317                         <entry><emphasis><constant>FALSE</constant></emphasis>
318                         </entry>
319                     </row>
320                 </tbody>
321             </tgroup>
322         </table>
324         <table id="zend.date.constants.list.table-5">
325             <title>時間に関する定数</title>
326             <tgroup cols="4">
327                 <thead>
328                     <row>
329                         <entry>定数</entry>
330                         <entry>説明</entry>
331                         <entry>日付</entry>
332                         <entry>結果</entry>
333                     </row>
334                 </thead>
335                 <tbody>
336                     <row>
337                         <entry><constant>Zend_Date::HOUR</constant></entry>
338                         <entry>時 (00-23、二桁)</entry>
339                         <entry>2009-02-13T14:53:27+01:00</entry>
340                         <entry><emphasis>14</emphasis>
341                         </entry>
342                     </row>
343                     <row>
344                         <entry><constant>Zend_Date::HOUR_SHORT</constant></entry>
345                         <entry>時 (0-23、一桁あるいは二桁)</entry>
346                         <entry>2009-02-13T14:53:27+01:00</entry>
347                         <entry><emphasis>14</emphasis>
348                         </entry>
349                     </row>
350                     <row>
351                         <entry><constant>Zend_Date::HOUR_SHORT_AM</constant></entry>
352                         <entry>時 (1-12、一桁あるいは二桁)</entry>
353                         <entry>2009-02-13T14:53:27+01:00</entry>
354                         <entry><emphasis>2</emphasis>
355                         </entry>
356                     </row>
357                     <row>
358                         <entry><constant>Zend_Date::HOUR_AM</constant></entry>
359                         <entry>時 (01-12、二桁)</entry>
360                         <entry>2009-02-13T14:53:27+01:00</entry>
361                         <entry><emphasis>02</emphasis>
362                         </entry>
363                     </row>
364                     <row>
365                         <entry><constant>Zend_Date::MINUTE</constant></entry>
366                         <entry>分 (00-59、二桁)</entry>
367                         <entry>2009-02-13T14:53:27+01:00</entry>
368                         <entry><emphasis>53</emphasis></entry>
369                     </row>
370                     <row>
371                         <entry><constant>Zend_Date::MINUTE_SHORT</constant></entry>
372                         <entry>分 (0-59、一桁あるいは二桁)</entry>
373                         <entry>2009-02-13T14:03:27+01:00</entry>
374                         <entry><emphasis>3</emphasis></entry>
375                     </row>
376                     <row>
377                         <entry><constant>Zend_Date::SECOND</constant></entry>
378                         <entry>秒 (00-59、二桁)</entry>
379                         <entry>2009-02-13T14:53:27+01:00</entry>
380                         <entry><emphasis>27</emphasis></entry>
381                     </row>
382                     <row>
383                         <entry><constant>Zend_Date::SECOND_SHORT</constant></entry>
384                         <entry>秒 (0-59、一桁あるいは二桁)</entry>
385                         <entry>2009-02-13T14:53:07+01:00</entry>
386                         <entry><emphasis>7</emphasis></entry>
387                     </row>
388                     <row>
389                         <entry><constant>Zend_Date::MILLISECOND</constant></entry>
390                         <entry>ミリ秒 (理論上は無限大)</entry>
391                         <entry><command>2009-02-13T14:53:27.20546</command></entry>
392                         <entry><emphasis>20546</emphasis></entry>
393                     </row>
394                     <row>
395                         <entry><constant>Zend_Date::MERIDIEM</constant></entry>
396                         <entry>その日の中での時間 (午前/午後)</entry>
397                         <entry>2009-02-13T14:53:27+01:00</entry>
398                         <entry><emphasis>afternoon</emphasis>
399                         </entry>
400                     </row>
401                     <row>
402                         <entry><constant>Zend_Date::SWATCH</constant></entry>
403                         <entry>Swatch Internet Time</entry>
404                         <entry>2009-02-13T14:53:27+01:00</entry>
405                         <entry><emphasis>620</emphasis>
406                         </entry>
407                     </row>
408                 </tbody>
409             </tgroup>
410         </table>
412         <table id="zend.date.constants.list.table-6">
413             <title>タイムゾーンに関する定数</title>
414             <tgroup cols="4">
415                 <thead>
416                     <row>
417                         <entry>定数</entry>
418                         <entry>説明</entry>
419                         <entry>日付</entry>
420                         <entry>結果</entry>
421                     </row>
422                 </thead>
423                 <tbody>
424                     <row>
425                         <entry><constant>Zend_Date::TIMEZONE</constant></entry>
426                         <entry>タイムゾーン名 (省略形文字列)</entry>
427                         <entry>2009-02-13T14:53:27+01:00</entry>
428                         <entry><emphasis><acronym>CET</acronym></emphasis>
429                         </entry>
430                     </row>
431                     <row>
432                         <entry><constant>Zend_Date::TIMEZONE_NAME</constant></entry>
433                         <entry>タイムゾーン名 (文字列)</entry>
434                         <entry>2009-02-13T14:53:27+01:00</entry>
435                         <entry><emphasis><command>Europe/Paris</command></emphasis>
436                         </entry>
437                     </row>
438                     <row>
439                         <entry><constant>Zend_Date::TIMEZONE_SECS</constant></entry>
440                         <entry><acronym>GMT</acronym> との時差を表す秒数 (integer)</entry>
441                         <entry>2009-02-13T14:53:27+01:00</entry>
442                         <entry><emphasis>3600</emphasis> seconds to <acronym>GMT</acronym></entry>
443                     </row>
444                     <row>
445                         <entry><constant>Zend_Date::GMT_DIFF</constant></entry>
446                         <entry><acronym>GMT</acronym> との時差を表す秒数 (文字列)</entry>
447                         <entry>2009-02-13T14:53:27+01:00</entry>
448                         <entry><emphasis>+0100</emphasis>
449                         </entry>
450                     </row>
451                     <row>
452                         <entry><constant>Zend_Date::GMT_DIFF_SEP</constant></entry>
453                         <entry><acronym>GMT</acronym> との時差を表す秒数 (文字列、分割形式)</entry>
454                         <entry>2009-02-13T14:53:27+01:00</entry>
455                         <entry><emphasis>+01:00</emphasis>
456                         </entry>
457                     </row>
458                     <row>
459                         <entry><constant>Zend_Date::DAYLIGHT</constant></entry>
460                         <entry>夏時間かそうでないか? (<constant>TRUE</constant> あるいは <constant>FALSE</constant>)</entry>
461                         <entry>2009-02-13T14:53:27+01:00</entry>
462                         <entry><emphasis><constant>FALSE</constant></emphasis>
463                         </entry>
464                     </row>
465                 </tbody>
466             </tgroup>
467         </table>
469         <table id="zend.date.constants.list.table-7">
470             <title>日付フォーマットに関する定数 (タイムゾーンを含むフォーマット)</title>
471             <tgroup cols="4">
472                 <thead>
473                     <row>
474                         <entry>定数</entry>
475                         <entry>説明</entry>
476                         <entry>日付</entry>
477                         <entry>結果</entry>
478                     </row>
479                 </thead>
480                 <tbody>
481                     <row>
482                         <entry><constant>Zend_Date::ISO_860</constant>1</entry>
483                         <entry><acronym>ISO</acronym> 8601 形式の日付 (文字列)</entry>
484                         <entry>2009-02-13T14:53:27+01:00</entry>
485                         <entry><emphasis>2009-02-13T14:53:27+01:00</emphasis>
486                         </entry>
487                     </row>
488                     <row>
489                         <entry><constant>Zend_Date::RFC_2822</constant></entry>
490                         <entry><acronym>RFC</acronym> 2822 形式の日付 (文字列)</entry>
491                         <entry>2009-02-13T14:53:27+01:00</entry>
492                         <entry><emphasis>Fri, 13 Feb 2009 14:53:27 +0100</emphasis>
493                         </entry>
494                     </row>
495                     <row>
496                         <entry><constant>Zend_Date::TIMESTAMP</constant></entry>
497                         <entry>
498                             <ulink url="http://en.wikipedia.org/wiki/Unix_Time">Unix time</ulink> (1970 年 1 月 1 日からの経過秒数)</entry>
499                         <entry>2009-02-13T14:53:27+01:00</entry>
500                         <entry><emphasis>1234533207</emphasis>
501                         </entry>
502                     </row>
503                     <row>
504                         <entry><constant>Zend_Date::ATOM</constant></entry>
505                         <entry><acronym>ATOM</acronym> 形式の日付 (文字列)</entry>
506                         <entry>2009-02-13T14:53:27+01:00</entry>
507                         <entry><emphasis>2009-02-13T14:53:27+01:00</emphasis>
508                         </entry>
509                     </row>
510                     <row>
511                         <entry><constant>Zend_Date::COOKIE</constant></entry>
512                         <entry>クッキー形式の日付 (クッキー用の文字列)</entry>
513                         <entry>2009-02-13T14:53:27+01:00</entry>
514                         <entry>
515                             <emphasis><command>Friday, 13-Feb-09 14:53:27
516                                 Europe/Paris</command></emphasis>
517                         </entry>
518                     </row>
519                     <row>
520                         <entry><constant>Zend_Date::RFC_822</constant></entry>
521                         <entry><acronym>RFC</acronym> 822 形式の日付 (文字列)</entry>
522                         <entry>2009-02-13T14:53:27+01:00</entry>
523                         <entry><emphasis>Fri, 13 Feb 09 14:53:27 +0100</emphasis>
524                         </entry>
525                     </row>
526                     <row>
527                         <entry><constant>Zend_Date::RFC_850</constant></entry>
528                         <entry><acronym>RFC</acronym> 850 形式の日付 (文字列)</entry>
529                         <entry>2009-02-13T14:53:27+01:00</entry>
530                         <entry>
531                             <emphasis><command>Friday, 13-Feb-09 14:53:27
532                                 Europe/Paris</command></emphasis>
533                         </entry>
534                     </row>
535                     <row>
536                         <entry><constant>Zend_Date::RFC_1036</constant></entry>
537                         <entry><acronym>RFC</acronym> 1036 形式の日付 (文字列)</entry>
538                         <entry>2009-02-13T14:53:27+01:00</entry>
539                         <entry><emphasis>Fri, 13 Feb 09 14:53:27 +0100</emphasis>
540                         </entry>
541                     </row>
542                     <row>
543                         <entry><constant>Zend_Date::RFC_1123</constant></entry>
544                         <entry><acronym>RFC</acronym> 1123 形式の日付 (文字列)</entry>
545                         <entry>2009-02-13T14:53:27+01:00</entry>
546                         <entry><emphasis>Fri, 13 Feb 2009 14:53:27 +0100</emphasis>
547                         </entry>
548                     </row>
549                     <row>
550                         <entry><constant>Zend_Date::RSS</constant></entry>
551                         <entry><acronym>RSS</acronym> フィード形式の日付 (文字列)</entry>
552                         <entry>2009-02-13T14:53:27+01:00</entry>
553                         <entry><emphasis>Fri, 13 Feb 2009 14:53:27 +0100</emphasis>
554                         </entry>
555                     </row>
556                     <row>
557                         <entry><constant>Zend_Date::W3C</constant></entry>
558                         <entry>
559                             <acronym>HTML</acronym> あるいは <acronym>HTTP</acronym> 用の
560                             <acronym>W3C</acronym> 形式の日付 (文字列)
561                         </entry>
562                         <entry>2009-02-13T14:53:27+01:00</entry>
563                         <entry><emphasis>2009-02-13T14:53:27+01:00</emphasis>
564                         </entry>
565                     </row>
566                 </tbody>
567             </tgroup>
568         </table>
570         <para>
571             特に注意すべきなのは <constant>Zend_Date::DATES</constant> です。これは、
572             <classname>Zend_Date</classname> で <emphasis>入力</emphasis>
573             フォーマットを指定する際に使用すると、特別な働きをします。
574             入力フォーマットとして <varname>$part</varname> で使用すると、
575             この定数は、さまざまな類似日付書式をできるだけ受け入れようとします。
576             経験則にもとづいて入力日付文字列を自動的に分解し、単純なエラーを (もしあれば)
577             できるだけ修正します。たとえば年、月、日の順序がおかしい場合などです。
578         </para>
580         <table id="zend.date.constants.list.table-8">
581             <title>日付および時刻フォーマットに関する定数 (ロケールによって変化する書式)</title>
582             <tgroup cols="4">
583                 <thead>
584                     <row>
585                         <entry>定数</entry>
586                         <entry>説明</entry>
587                         <entry>日付</entry>
588                         <entry>結果</entry>
589                     </row>
590                 </thead>
591                 <tbody>
592                     <row>
593                         <entry><constant>Zend_Date::ERA</constant></entry>
594                         <entry>時代 (地域化された文字列の短縮形)</entry>
595                         <entry>2009-02-13T14:53:27+01:00</entry>
596                         <entry><emphasis>AD</emphasis> (紀元後)</entry>
597                     </row>
598                     <row>
599                         <entry><constant>Zend_Date::ERA_NAME</constant></entry>
600                         <entry>時代 (地域化された文字列の完全系)</entry>
601                         <entry>2009-02-13T14:53:27+01:00</entry>
602                         <entry><emphasis>anno domini</emphasis> (紀元後)</entry>
603                     </row>
604                     <row>
605                         <entry><emphasis>Zend_Date::DATES</emphasis>
606                         </entry>
607                         <entry>標準の日付 (地域化された文字列、デフォルト値)</entry>
608                         <entry>2009-02-13T14:53:27+01:00</entry>
609                         <entry><emphasis>13.02.2009</emphasis>
610                         </entry>
611                     </row>
612                     <row>
613                         <entry><constant>Zend_Date::DATE_FULL</constant></entry>
614                         <entry>完全な日付 (地域化された文字列、完全形)</entry>
615                         <entry>2009-02-13T14:53:27+01:00</entry>
616                         <entry><emphasis>Friday, 13. February 2009</emphasis>
617                         </entry>
618                     </row>
619                     <row>
620                         <entry><constant>Zend_Date::DATE_LONG</constant></entry>
621                         <entry>長い日付 (地域化された文字列、長い形式)</entry>
622                         <entry>2009-02-13T14:53:27+01:00</entry>
623                         <entry><emphasis>13. February 2009</emphasis>
624                         </entry>
625                     </row>
626                     <row>
627                         <entry><constant>Zend_Date::DATE_MEDIUM</constant></entry>
628                         <entry>通常の日付 (地域化された文字列、通常の形式)</entry>
629                         <entry>2009-02-13T14:53:27+01:00</entry>
630                         <entry><emphasis>13.02.2009</emphasis>
631                         </entry>
632                     </row>
633                     <row>
634                         <entry><constant>Zend_Date::DATE_SHORT</constant></entry>
635                         <entry>省略形の日付 (地域化された文字列、短縮形式)</entry>
636                         <entry>2009-02-13T14:53:27+01:00</entry>
637                         <entry><emphasis>13.02.09</emphasis>
638                         </entry>
639                     </row>
640                     <row>
641                         <entry><constant>Zend_Date::TIMES</constant></entry>
642                         <entry>標準の時刻 (地域化された文字列、デフォルト値)</entry>
643                         <entry>2009-02-13T14:53:27+01:00</entry>
644                         <entry><emphasis>14:53:27</emphasis>
645                         </entry>
646                     </row>
647                     <row>
648                         <entry><constant>Zend_Date::TIME_FULL</constant></entry>
649                         <entry>完全な時刻 (地域化された文字列、完全形)</entry>
650                         <entry>2009-02-13T14:53:27+01:00</entry>
651                         <entry><emphasis>14:53 Uhr <acronym>CET</acronym></emphasis>
652                         </entry>
653                     </row>
654                     <row>
655                         <entry><constant>Zend_Date::TIME_LONG</constant></entry>
656                         <entry>長い時刻 (地域化された文字列、長い形式)</entry>
657                         <entry>2009-02-13T14:53:27+01:00</entry>
658                         <entry><emphasis>14:53:27 <acronym>CET</acronym></emphasis>
659                         </entry>
660                     </row>
661                     <row>
662                         <entry><constant>Zend_Date::TIME_MEDIUM</constant></entry>
663                         <entry>通常の時刻 (地域化された文字列、通常の形式)</entry>
664                         <entry>2009-02-13T14:53:27+01:00</entry>
665                         <entry><emphasis>14:53:27</emphasis>
666                         </entry>
667                     </row>
668                     <row>
669                         <entry><constant>Zend_Date::TIME_SHORT</constant></entry>
670                         <entry>省略形の時刻 (地域化された文字列、短縮形式)</entry>
671                         <entry>2009-02-13T14:53:27+01:00</entry>
672                         <entry><emphasis>14:53</emphasis>
673                         </entry>
674                     </row>
675                     <row>
676                         <entry><emphasis>Zend_Date::DATETIME</emphasis>
677                         </entry>
678                         <entry>標準の日付・時刻 (地域化された文字列、デフォルト値)</entry>
679                         <entry>2009-02-13T14:53:27+01:00</entry>
680                         <entry><emphasis>13.02.2009 14:53:27</emphasis>
681                         </entry>
682                     </row>
683                     <row>
684                         <entry><constant>Zend_Date::DATETIME_FULL</constant></entry>
685                         <entry>完全な日付・時刻 (地域化された文字列、完全な形式)</entry>
686                         <entry>2009-02-13T14:53:27+01:00</entry>
687                         <entry><emphasis>Friday, 13. February 2009 14:53 Uhr <acronym>CET</acronym></emphasis>
688                         </entry>
689                     </row>
690                     <row>
691                         <entry><constant>Zend_Date::DATETIME_LONG</constant></entry>
692                         <entry>長い日付・時刻 (地域化された文字列、長い形式)</entry>
693                         <entry>2009-02-13T14:53:27+01:00</entry>
694                         <entry><emphasis>13. February 2009 14:53:27 <acronym>CET</acronym></emphasis>
695                         </entry>
696                     </row>
697                     <row>
698                         <entry><constant>Zend_Date::DATETIME_MEDIUM</constant></entry>
699                         <entry>通常の日付・時刻 (地域化された文字列、通常の形式)</entry>
700                         <entry>2009-02-13T14:53:27+01:00</entry>
701                         <entry><emphasis>13.02.2009 14:53:27</emphasis>
702                         </entry>
703                     </row>
704                     <row>
705                         <entry><constant>Zend_Date::DATETIME_SHORT</constant></entry>
706                         <entry>省略形の日付・時刻 (地域化された文字列、短縮形式)</entry>
707                         <entry>2009-02-13T14:53:27+01:00</entry>
708                         <entry><emphasis>13.02.09 14:53</emphasis>
709                         </entry>
710                     </row>
711                 </tbody>
712             </tgroup>
713         </table>
715     </sect2>
717     <sect2 id="zend.date.constants.selfdefinedformats">
719         <title>ISO 書式指定子を使用して自分で定義する出力フォーマット</title>
721         <para>
722             上で示したもの意外の日付書式が必要な場合は、以下に示す
723             <acronym>ISO</acronym> 書式トークンを使用して自分で書式を定義します。
724             以下の例は、下の表の定数を用いて独自の <acronym>ISO</acronym> 書式を作成する方法を示すものです。
725             書式の長さは無制限で、同じ定数を複数回使用してもかまいません。
726         </para>
728         <para>
729             もし <acronym>PHP</acronym> 風の日付書式のほうがなじみがあるのなら、
730             <acronym>ISO</acronym> 書式ではなく <acronym>PHP</acronym> の書式を用いるように変更することも可能です。
731             しかし、<acronym>ISO</acronym> で定められているすべての書式が <acronym>PHP</acronym> の日付書式で指定できるわけではありません。
732             <methodname>Zend_Date::setOptions(array('format_type' => 'php'))</methodname> メソッドを使用すると、
733             <classname>Zend_Date</classname> のメソッドで <acronym>ISO</acronym> 書式指定子ではなく <acronym>PHP</acronym> の date() での指定子を用いるようになります
734             (以下の <link linkend="zend.date.constants.phpformats">PHP の date() 関数の書式指定子を使用して
735             自分で定義する出力フォーマット</link> を参照ください)。
736         </para>
738         <example id="zend.date.constants.selfdefinedformats.example-1">
739             <title>ISO 書式を使用した独自書式</title>
740             <programlisting language="php"><![CDATA[
741 $locale = new Zend_Locale('de_AT');
742 $date = new Zend_Date(1234567890, false, $locale);
743 print $date->toString("'Era:GGGG='GGGG, ' Date:yy.MMMM.dd'yy.MMMM.dd");
744 ]]></programlisting>
745         </example>
747         <table id="zend.date.constants.selfdefinedformats.table">
748             <title>ISO 8601 日付出力に関する定数</title>
749             <tgroup cols="4">
750                 <thead>
751                     <row>
752                         <entry>定数</entry>
753                         <entry>説明</entry>
754                         <entry>対応する要素</entry>
755                         <entry>結果</entry>
756                     </row>
757                 </thead>
758                 <tbody>
759                     <row>
760                         <entry>G</entry>
761                         <entry>時代 (地域化された省略形)</entry>
762                         <entry><constant>Zend_Date::ERA</constant></entry>
763                         <entry><emphasis>AD</emphasis>
764                         </entry>
765                     </row>
766                     <row>
767                         <entry>GG</entry>
768                         <entry>時代 (地域化された省略形)</entry>
769                         <entry><constant>Zend_Date::ERA</constant></entry>
770                         <entry><emphasis>AD</emphasis>
771                         </entry>
772                     </row>
773                     <row>
774                         <entry><constant>GGG</constant></entry>
775                         <entry>時代 (地域化された省略形)</entry>
776                         <entry><constant>Zend_Date::ERA</constant></entry>
777                         <entry><emphasis>AD</emphasis>
778                         </entry>
779                     </row>
780                     <row>
781                         <entry><constant>GGGG</constant></entry>
782                         <entry>時代 (地域化された完全形)</entry>
783                         <entry><constant>Zend_Date::ERA_NAME</constant></entry>
784                         <entry><emphasis>anno domini</emphasis>
785                         </entry>
786                     </row>
787                     <row>
788                         <entry><constant>GGGGG</constant></entry>
789                         <entry>時代 (地域化された省略形)</entry>
790                         <entry><constant>Zend_Date::ERA</constant></entry>
791                         <entry><emphasis>a</emphasis>
792                         </entry>
793                     </row>
794                     <row>
795                         <entry>y</entry>
796                         <entry>年 (最低一桁)</entry>
797                         <entry><constant>Zend_Date::YEAR</constant></entry>
798                         <entry><emphasis>9</emphasis>
799                         </entry>
800                     </row>
801                     <row>
802                         <entry>yy</entry>
803                         <entry>年 (最低二桁)</entry>
804                         <entry><constant>Zend_Date::YEAR_SHORT</constant></entry>
805                         <entry><emphasis>09</emphasis>
806                         </entry>
807                     </row>
808                     <row>
809                         <entry>yyy</entry>
810                         <entry>年 (最低三桁)</entry>
811                         <entry><constant>Zend_Date::YEAR</constant></entry>
812                         <entry><emphasis>2009</emphasis>
813                         </entry>
814                     </row>
815                     <row>
816                         <entry>yyyy</entry>
817                         <entry>年 (最低四桁)</entry>
818                         <entry><constant>Zend_Date::YEAR</constant></entry>
819                         <entry><emphasis>2009</emphasis>
820                         </entry>
821                     </row>
822                     <row>
823                         <entry>yyyyy</entry>
824                         <entry>年 (最低五桁)</entry>
825                         <entry><constant>Zend_Date::YEAR</constant></entry>
826                         <entry><emphasis>02009</emphasis>
827                         </entry>
828                     </row>
829                     <row>
830                         <entry>Y</entry>
831                         <entry><acronym>ISO</acronym> 8601 形式の年 (最低一桁)</entry>
832                         <entry><constant>Zend_Date::YEAR_8601</constant></entry>
833                         <entry><emphasis>9</emphasis>
834                         </entry>
835                     </row>
836                     <row>
837                         <entry>YY</entry>
838                         <entry><acronym>ISO</acronym> 8601 形式の年 (最低二桁)</entry>
839                         <entry><constant>Zend_Date::YEAR_SHORT_8601</constant></entry>
840                         <entry><emphasis>09</emphasis>
841                         </entry>
842                     </row>
843                     <row>
844                         <entry><constant>YYY</constant></entry>
845                         <entry><acronym>ISO</acronym> 8601 形式の年 (最低三桁)</entry>
846                         <entry><constant>Zend_Date::YEAR_8601</constant></entry>
847                         <entry><emphasis>2009</emphasis>
848                         </entry>
849                     </row>
850                     <row>
851                         <entry><constant>YYYY</constant></entry>
852                         <entry><acronym>ISO</acronym> 8601 形式の年 (最低四桁)</entry>
853                         <entry><constant>Zend_Date::YEAR_8601</constant></entry>
854                         <entry><emphasis>2009</emphasis>
855                         </entry>
856                     </row>
857                     <row>
858                         <entry><constant>YYYYY</constant></entry>
859                         <entry><acronym>ISO</acronym> 8601 形式の年 (最低五桁)</entry>
860                         <entry><constant>Zend_Date::YEAR_8601</constant></entry>
861                         <entry><emphasis>02009</emphasis>
862                         </entry>
863                     </row>
864                     <row>
865                         <entry>M</entry>
866                         <entry>月 (一桁あるいは二桁)</entry>
867                         <entry><constant>Zend_Date::MONTH_SHORT</constant></entry>
868                         <entry><emphasis>2</emphasis>
869                         </entry>
870                     </row>
871                     <row>
872                         <entry>MM</entry>
873                         <entry>月 (二桁)</entry>
874                         <entry><constant>Zend_Date::MONTH</constant></entry>
875                         <entry><emphasis>02</emphasis>
876                         </entry>
877                     </row>
878                     <row>
879                         <entry><constant>MMM</constant></entry>
880                         <entry>月 (地域化された省略形)</entry>
881                         <entry><constant>Zend_Date::MONTH_NAME_SHORT</constant></entry>
882                         <entry><emphasis>Feb</emphasis>
883                         </entry>
884                     </row>
885                     <row>
886                         <entry><constant>MMMM</constant></entry>
887                         <entry>月 (地域化された完全形)</entry>
888                         <entry><constant>Zend_Date::MONTH_NAME</constant></entry>
889                         <entry><emphasis>February</emphasis>
890                         </entry>
891                     </row>
892                     <row>
893                         <entry><constant>MMMMM</constant></entry>
894                         <entry>月 (地域化された省略形、一桁)</entry>
895                         <entry><constant>Zend_Date::MONTH_NAME_NARROW</constant></entry>
896                         <entry><emphasis>F</emphasis>
897                         </entry>
898                     </row>
899                     <row>
900                         <entry>w</entry>
901                         <entry>週 (一桁あるいは二桁)</entry>
902                         <entry><constant>Zend_Date::WEEK</constant></entry>
903                         <entry><emphasis>5</emphasis>
904                         </entry>
905                     </row>
906                     <row>
907                         <entry>ww</entry>
908                         <entry>週 (二桁)</entry>
909                         <entry><constant>Zend_Date::WEEK</constant></entry>
910                         <entry><emphasis>05</emphasis>
911                         </entry>
912                     </row>
913                     <row>
914                         <entry>d</entry>
915                         <entry>その月の日付 (一桁あるいは二桁)</entry>
916                         <entry><constant>Zend_Date::DAY_SHORT</constant></entry>
917                         <entry><emphasis>9</emphasis>
918                         </entry>
919                     </row>
920                     <row>
921                         <entry>dd</entry>
922                         <entry>その月の日付 (二桁)</entry>
923                         <entry><constant>Zend_Date::DAY</constant></entry>
924                         <entry><emphasis>09</emphasis>
925                         </entry>
926                     </row>
927                     <row>
928                         <entry>D</entry>
929                         <entry>その年の日付 (一桁、二桁あるいは三桁)</entry>
930                         <entry><constant>Zend_Date::DAY_OF_YEAR</constant></entry>
931                         <entry><emphasis>7</emphasis>
932                         </entry>
933                     </row>
934                     <row>
935                         <entry>DD</entry>
936                         <entry>その年の日付 (二桁あるいは三桁)</entry>
937                         <entry><constant>Zend_Date::DAY_OF_YEAR</constant></entry>
938                         <entry><emphasis>07</emphasis>
939                         </entry>
940                     </row>
941                     <row>
942                         <entry><constant>DDD</constant></entry>
943                         <entry>その年の日付 (三桁)</entry>
944                         <entry><constant>Zend_Date::DAY_OF_YEAR</constant></entry>
945                         <entry><emphasis>007</emphasis>
946                         </entry>
947                     </row>
948                     <row>
949                         <entry>E</entry>
950                         <entry>曜日 (地域化された省略形、一文字)</entry>
951                         <entry><constant>Zend_Date::WEEKDAY_NARROW</constant></entry>
952                         <entry><emphasis>M</emphasis>
953                         </entry>
954                     </row>
955                     <row>
956                         <entry>EE</entry>
957                         <entry>曜日 (地域化された省略形、二文字以上)</entry>
958                         <entry><constant>Zend_Date::WEEKDAY_NAME</constant></entry>
959                         <entry><emphasis>Mo</emphasis>
960                         </entry>
961                     </row>
962                     <row>
963                         <entry><constant>EEE</constant></entry>
964                         <entry>曜日 (地域化された省略形、三文字)</entry>
965                         <entry><constant>Zend_Date::WEEKDAY_SHORT</constant></entry>
966                         <entry><emphasis>Mon</emphasis>
967                         </entry>
968                     </row>
969                     <row>
970                         <entry><constant>EEEE</constant></entry>
971                         <entry>曜日 (地域化された完全形)</entry>
972                         <entry><constant>Zend_Date::WEEKDAY</constant></entry>
973                         <entry><emphasis>Monday</emphasis>
974                         </entry>
975                     </row>
976                     <row>
977                         <entry><constant>EEEEE</constant></entry>
978                         <entry>曜日 (地域化された省略形、一桁)</entry>
979                         <entry><constant>Zend_Date::WEEKDAY_NARROW</constant></entry>
980                         <entry><emphasis>M</emphasis>
981                         </entry>
982                     </row>
983                     <row>
984                         <entry>e</entry>
985                         <entry>曜日番号 (一桁)</entry>
986                         <entry><constant>Zend_Date::WEEKDAY_DIGIT</constant></entry>
987                         <entry><emphasis>4</emphasis>
988                         </entry>
989                     </row>
990                     <row>
991                         <entry>ee</entry>
992                         <entry>曜日番号 (二桁)</entry>
993                         <entry><constant>Zend_Date::WEEKDAY_NARROW</constant></entry>
994                         <entry><emphasis>04</emphasis>
995                         </entry>
996                     </row>
997                     <row>
998                         <entry>a</entry>
999                         <entry>午前/午後 (地域化された形式)</entry>
1000                         <entry><constant>Zend_Date::MERIDIEM</constant></entry>
1001                         <entry><emphasis>vorm.</emphasis>
1002                         </entry>
1003                     </row>
1004                     <row>
1005                         <entry>h</entry>
1006                         <entry>時間 (1-12) (一桁あるいは二桁)</entry>
1007                         <entry><constant>Zend_Date::HOUR_SHORT_AM</constant></entry>
1008                         <entry><emphasis>2</emphasis>
1009                         </entry>
1010                     </row>
1011                     <row>
1012                         <entry>hh</entry>
1013                         <entry>時間 (01-12) (二桁)</entry>
1014                         <entry><constant>Zend_Date::HOUR_AM</constant></entry>
1015                         <entry><emphasis>02</emphasis>
1016                         </entry>
1017                     </row>
1018                     <row>
1019                         <entry>H</entry>
1020                         <entry>時間 (0-23) (一桁あるいは二桁)</entry>
1021                         <entry><constant>Zend_Date::HOUR_SHORT</constant></entry>
1022                         <entry><emphasis>2</emphasis>
1023                         </entry>
1024                     </row>
1025                     <row>
1026                         <entry>HH</entry>
1027                         <entry>時間 (00-23) (二桁)</entry>
1028                         <entry><constant>Zend_Date::HOUR</constant></entry>
1029                         <entry><emphasis>02</emphasis>
1030                         </entry>
1031                     </row>
1032                     <row>
1033                         <entry>m</entry>
1034                         <entry>分 (0-59) (一桁あるいは二桁)</entry>
1035                         <entry><constant>Zend_Date::MINUTE_SHORT</constant></entry>
1036                         <entry><emphasis>2</emphasis>
1037                         </entry>
1038                     </row>
1039                     <row>
1040                         <entry>mm</entry>
1041                         <entry>分 (00-59) (二桁)</entry>
1042                         <entry><constant>Zend_Date::MINUTE</constant></entry>
1043                         <entry><emphasis>02</emphasis>
1044                         </entry>
1045                     </row>
1046                     <row>
1047                         <entry>s</entry>
1048                         <entry>秒 (0-59) (一桁あるいは二桁)</entry>
1049                         <entry><constant>Zend_Date::SECOND_SHORT</constant></entry>
1050                         <entry><emphasis>2</emphasis>
1051                         </entry>
1052                     </row>
1053                     <row>
1054                         <entry>ss</entry>
1055                         <entry>秒 (00-59) (二桁)</entry>
1056                         <entry><constant>Zend_Date::SECOND</constant></entry>
1057                         <entry><emphasis>02</emphasis>
1058                         </entry>
1059                     </row>
1060                     <row>
1061                         <entry>S</entry>
1062                         <entry>ミリ秒</entry>
1063                         <entry><constant>Zend_Date::MILLISECOND</constant></entry>
1064                         <entry><emphasis>20536</emphasis>
1065                         </entry>
1066                     </row>
1067                     <row>
1068                         <entry>z</entry>
1069                         <entry>タイムゾーン (地域化された省略形)</entry>
1070                         <entry><constant>Zend_Date::TIMEZONE</constant></entry>
1071                         <entry><emphasis>CET</emphasis>
1072                         </entry>
1073                     </row>
1074                     <row>
1075                         <entry>zz</entry>
1076                         <entry>タイムゾーン (地域化された省略形)</entry>
1077                         <entry><constant>Zend_Date::TIMEZONE</constant></entry>
1078                         <entry><emphasis>CET</emphasis>
1079                         </entry>
1080                     </row>
1081                     <row>
1082                         <entry>zzz</entry>
1083                         <entry>タイムゾーン (地域化された省略形)</entry>
1084                         <entry><constant>Zend_Date::TIMEZONE</constant></entry>
1085                         <entry><emphasis>CET</emphasis>
1086                         </entry>
1087                     </row>
1088                     <row>
1089                         <entry>zzzz</entry>
1090                         <entry>タイムゾーン (地域化された完全形)</entry>
1091                         <entry><constant>Zend_Date::TIMEZONE_NAME</constant></entry>
1092                         <entry><emphasis>Europe/Paris</emphasis>
1093                         </entry>
1094                     </row>
1095                     <row>
1096                         <entry>Z</entry>
1097                         <entry>タイムゾーンの時差</entry>
1098                         <entry><constant>Zend_Date::GMT_DIFF</constant></entry>
1099                         <entry><emphasis>+0100</emphasis>
1100                         </entry>
1101                     </row>
1102                     <row>
1103                         <entry>ZZ</entry>
1104                         <entry>タイムゾーンの時差</entry>
1105                         <entry><constant>Zend_Date::GMT_DIFF</constant></entry>
1106                         <entry><emphasis>+0100</emphasis>
1107                         </entry>
1108                     </row>
1109                     <row>
1110                         <entry><constant>ZZZ</constant></entry>
1111                         <entry>タイムゾーンの時差</entry>
1112                         <entry><constant>Zend_Date::GMT_DIFF</constant></entry>
1113                         <entry><emphasis>+0100</emphasis>
1114                         </entry>
1115                     </row>
1116                     <row>
1117                         <entry><constant>ZZZZ</constant></entry>
1118                         <entry>タイムゾーンの時差 (分割形式)</entry>
1119                         <entry><constant>Zend_Date::GMT_DIFF_SEP</constant></entry>
1120                         <entry><emphasis>+01:00</emphasis>
1121                         </entry>
1122                     </row>
1123                     <row>
1124                         <entry>A</entry>
1125                         <entry>ミリ秒</entry>
1126                         <entry><constant>Zend_Date::MILLISECOND</constant></entry>
1127                         <entry><emphasis>20563</emphasis>
1128                         </entry>
1129                     </row>
1130                 </tbody>
1131             </tgroup>
1132         </table>
1134         <note>
1135             <para>
1136                 デフォルトの <acronym>ISO</acronym> フォーマットは、<acronym>PHP</acronym> のフォーマットとは異なることに注意しましょう。
1137                 これまでに使ったことがない方は、少々いらいらするかもしれません。
1138                 特に、<emphasis>「年」と「分」</emphasis>
1139                 に関する指定子については、なかなか期待通りに動作しないことでしょう。
1140             </para>
1142             <para>
1143                 <emphasis>「年」</emphasis>
1144                 については、間違えやすい指定子がふたつあります。
1145                 <acronym>ISO</acronym> 形式の年を表す <emphasis>Y</emphasis> 指定子と、
1146                 実際の年を表す <emphasis>y</emphasis> 指定子です。
1147                 両者の違いは些細なものではありますが、非常に重要です。
1148                 <emphasis>Y</emphasis> は <acronym>ISO</acronym> 形式の年を算出するものです。
1149                 これは、カレンダーを作成する際によく用いられます。
1150                 2007 年 12 月 31 日を例にとって考えてみましょう。
1151                 実際の年は 2007 ですが、この日は
1152                 2008 年の最初の週 (第 1 週) の最初の日でもあります。
1153                 したがって、'dd.MM.yyyy' として場合は '31.December.2007'
1154                 が得られますが、'dd.MM.YYYY' とした場合の結果は '31.December.2008'
1155                 となるのです。これはバグではなく、期待通りの振る舞いです。
1156                 これが、ふたつの指定子の違いとなります。
1157             </para>
1159             <para>
1160                 <emphasis>「分」</emphasis>
1161                 の場合は、違いはそれほど大きくはありません。<acronym>ISO</acronym> では「分」
1162                 を表す指定子として <emphasis>m</emphasis>
1163                 を使用します。<acronym>PHP</acronym> が使っている <emphasis>i</emphasis>
1164                 ではありません。分を取得する書式指定をする際には、
1165                 正しい指定子を使っているかどうかを確認するようにしましょう。
1166             </para>
1167         </note>
1168     </sect2>
1170     <sect2 id="zend.date.constants.phpformats">
1172         <title>PHP の date() 関数の書式指定子を使用して自分で定義する出力フォーマット</title>
1174         <para>
1175             もし <acronym>PHP</acronym> の日付書式指定子のほうが <acronym>ISO</acronym> 書式指定子よりなじみがあるのなら、
1176             <methodname>Zend_Date::setOptions(array('format_type' => 'php'))</methodname> を使用しましょう。これで、
1177             <classname>Zend_Date</classname> のメソッドで <acronym>ISO</acronym> 書式指定子ではなく <acronym>PHP</acronym> の date() での指定子を用いるようになります
1178             その後の書式パラメータは、すべて
1179             <ulink url="http://php.net/date"><acronym>PHP</acronym> の <methodname>date()</methodname> 書式指定子</ulink>
1180             に従うようになります。<acronym>PHP</acronym> の日付書式には含まれていないけれども <acronym>ISO</acronym> の書式には含まれるもの、
1181             またその逆もあります。もしそれほど <acronym>PHP</acronym> の日付書式になじみがないのなら、標準の
1182             <acronym>ISO</acronym> 書式を使用しましょう。既存のコードで <acronym>PHP</acronym> の日付書式をしているものがある場合は
1183             <link linkend="zend.locale.date.normalize">Zend_Locale_Format::convertPhpToIsoFormat()</link>
1184             で <acronym>ISO</acronym> 書式に変換するか、<methodname>setOptions()</methodname>
1185             を使用します。次の例は、下の表の定数を用いて独自の書式を定義するものです。
1186         </para>
1188         <example id="zend.date.constants.phpformats.example-1">
1189             <title>PHP の指定子を使用した独自書式</title>
1190             <programlisting language="php"><![CDATA[
1191 $locale = new Zend_Locale('de_AT');
1192 Zend_Date::setOptions(array('format_type' => 'php'));
1193 $date = new Zend_Date(1234567890, false, $locale);
1195 // 出力は 'February 16, 2007, 3:36 am' のようになります
1196 print $date->toString('F j, Y, g:i a');
1198 print $date->toString("'Format:D M j G:i:s T Y='D M j G:i:s T Y");
1199 ]]></programlisting>
1200         </example>
1202         <important>
1203             <title>PHP の日付書式と定数の使用について</title>
1205             <para>
1206                 <classname>Zend_Date</classname> の定数は
1207                 <acronym>ISO</acronym> 記法を使っているということに注意しましょう。
1208                 つまり、<classname>Zend_Date</classname> で <acronym>PHP</acronym>
1209                 記法を使うように設定している場合は、<classname>Zend_Date</classname>
1210                 の定数は使えません。自分で書式を定義する必要があります。
1211                 この忠告に従わなければ、予期せぬ結果を得ることになるでしょう。
1212             </para>
1213         </important>
1215         <para>
1216             次の表は、<acronym>PHP</acronym> の日付書式指定子とそれに対応する <classname>Zend_Date</classname> の定数、
1217             そして同等な <acronym>CLDR</acronym>/ISO 書式指定子を示したものです。
1218             たいていの場合は、もし <acronym>CLDR</acronym>/ISO 書式に同等のものがなければ
1219             <methodname>Zend_Locale_Format::convertPhpToIsoFormat()</methodname>
1220             で <acronym>PHP</acronym> の書式指定子がそのまま残されます。そして <classname>Zend_Date</classname>
1221             のメソッドは、たとえ "ISO" 書式モードであったとしても、これらの
1222             <acronym>PHP</acronym> "独特の" 書式指定を理解します。
1223         </para>
1225         <table id="zend.date.constants.phpformats.table">
1226             <title>PHP の日付出力用の定数</title>
1227             <tgroup cols="5">
1228                 <thead>
1229                     <row>
1230                         <entry>定数</entry>
1231                         <entry>説明</entry>
1232                         <entry>対応する要素</entry>
1233                         <entry><acronym>CLDR</acronym> での同等の指定子</entry>
1234                         <entry>結果</entry>
1235                     </row>
1236                 </thead>
1237                 <tbody>
1238                     <row>
1239                         <entry>d</entry>
1240                         <entry>その月の日付 (二桁)</entry>
1241                         <entry><constant>Zend_Date::DAY</constant></entry>
1242                         <entry>dd</entry>
1243                         <entry><emphasis>09</emphasis>
1244                         </entry>
1245                     </row>
1246                     <row>
1247                         <entry>D</entry>
1248                         <entry>曜日 (地域化された省略形、三文字)</entry>
1249                         <entry><constant>Zend_Date::WEEKDAY_SHORT</constant></entry>
1250                         <entry>EEE</entry>
1251                         <entry><emphasis>Mon</emphasis>
1252                         </entry>
1253                     </row>
1254                     <row>
1255                         <entry>j</entry>
1256                         <entry>その月の日付 (一桁あるいは二桁)</entry>
1257                         <entry><constant>Zend_Date::DAY_SHORT</constant></entry>
1258                         <entry>d</entry>
1259                         <entry><emphasis>9</emphasis>
1260                         </entry>
1261                     </row>
1262                     <row>
1263                         <entry>l (小文字の L)</entry>
1264                         <entry>曜日 (地域化された完全形)</entry>
1265                         <entry><constant>Zend_Date::WEEKDAY</constant></entry>
1266                         <entry>EEEE</entry>
1267                         <entry><emphasis>Monday</emphasis>
1268                         </entry>
1269                     </row>
1270                     <row>
1271                         <entry>N</entry>
1272                         <entry>曜日番号 (一桁)</entry>
1273                         <entry><constant>Zend_Date::WEEKDAY_8601</constant></entry>
1274                         <entry>e</entry>
1275                         <entry><emphasis>4</emphasis>
1276                         </entry>
1277                     </row>
1278                     <row>
1279                         <entry>S</entry>
1280                         <entry>英語の日付の後につける接尾辞 (二文字)</entry>
1281                         <entry>なし</entry>
1282                         <entry>なし</entry>
1283                         <entry><emphasis>st</emphasis>
1284                         </entry>
1285                     </row>
1286                     <row>
1287                         <entry>w</entry>
1288                         <entry>曜日番号 (0=日曜日、6=土曜日)</entry>
1289                         <entry><constant>Zend_Date::WEEKDAY_DIGIT</constant></entry>
1290                         <entry>なし</entry>
1291                         <entry><emphasis>4</emphasis>
1292                         </entry>
1293                     </row>
1294                     <row>
1295                         <entry>z</entry>
1296                         <entry>その年の日付 (一桁、二桁あるいは三桁)</entry>
1297                         <entry><constant>Zend_Date::DAY_OF_YEAR</constant></entry>
1298                         <entry>D</entry>
1299                         <entry><emphasis>7</emphasis>
1300                         </entry>
1301                     </row>
1302                     <row>
1303                         <entry>W</entry>
1304                         <entry>週 (一桁あるいは二桁)</entry>
1305                         <entry><constant>Zend_Date::WEEK</constant></entry>
1306                         <entry>w</entry>
1307                         <entry><emphasis>5</emphasis>
1308                         </entry>
1309                     </row>
1310                     <row>
1311                         <entry>F</entry>
1312                         <entry>月 (地域化された完全形)</entry>
1313                         <entry><constant>Zend_Date::MONTH_NAME</constant></entry>
1314                         <entry>MMMM</entry>
1315                         <entry><emphasis>February</emphasis>
1316                         </entry>
1317                     </row>
1318                     <row>
1319                         <entry>m</entry>
1320                         <entry>月 (二桁)</entry>
1321                         <entry><constant>Zend_Date::MONTH</constant></entry>
1322                         <entry>MM</entry>
1323                         <entry><emphasis>02</emphasis>
1324                         </entry>
1325                     </row>
1326                     <row>
1327                         <entry>M</entry>
1328                         <entry>月 (地域化された省略形)</entry>
1329                         <entry><constant>Zend_Date::MONTH_NAME_SHORT</constant></entry>
1330                         <entry>MMM</entry>
1331                         <entry><emphasis>Feb</emphasis>
1332                         </entry>
1333                     </row>
1334                     <row>
1335                         <entry>n</entry>
1336                         <entry>月 (一桁あるいは二桁)</entry>
1337                         <entry><constant>Zend_Date::MONTH_SHORT</constant></entry>
1338                         <entry>M</entry>
1339                         <entry><emphasis>2</emphasis>
1340                         </entry>
1341                     </row>
1342                     <row>
1343                         <entry>t</entry>
1344                         <entry>その月の日数 (一桁あるいは二桁)</entry>
1345                         <entry><constant>Zend_Date::MONTH_DAYS</constant></entry>
1346                         <entry>なし</entry>
1347                         <entry><emphasis>30</emphasis>
1348                         </entry>
1349                     </row>
1350                     <row>
1351                         <entry>L</entry>
1352                         <entry>うるう年かどうか</entry>
1353                         <entry><constant>Zend_Date::LEAPYEAR</constant></entry>
1354                         <entry>なし</entry>
1355                         <entry><emphasis><constant>TRUE</constant></emphasis>
1356                         </entry>
1357                     </row>
1358                     <row>
1359                         <entry>o</entry>
1360                         <entry><acronym>ISO</acronym> 8601 形式の年 (最低四桁)</entry>
1361                         <entry><constant>Zend_Date::YEAR_8601</constant></entry>
1362                         <entry>YYYY</entry>
1363                         <entry><emphasis>2009</emphasis>
1364                         </entry>
1365                     </row>
1366                     <row>
1367                         <entry>Y</entry>
1368                         <entry>年 (最低四桁)</entry>
1369                         <entry><constant>Zend_Date::YEAR</constant></entry>
1370                         <entry>yyyy</entry>
1371                         <entry><emphasis>2009</emphasis>
1372                         </entry>
1373                     </row>
1374                     <row>
1375                         <entry>y</entry>
1376                         <entry>年 (最低二桁)</entry>
1377                         <entry><constant>Zend_Date::YEAR_SHORT</constant></entry>
1378                         <entry>yy</entry>
1379                         <entry><emphasis>09</emphasis>
1380                         </entry>
1381                     </row>
1382                     <row>
1383                         <entry>a</entry>
1384                         <entry>午前/午後 (地域化された形式)</entry>
1385                         <entry><constant>Zend_Date::MERIDIEM</constant></entry>
1386                         <entry>a (sort of, but likely to be uppercase)</entry>
1387                         <entry><emphasis>vorm.</emphasis>
1388                         </entry>
1389                     </row>
1390                     <row>
1391                         <entry>A</entry>
1392                         <entry>午前/午後 (地域化された形式)</entry>
1393                         <entry><constant>Zend_Date::MERIDIEM</constant></entry>
1394                         <entry>a (sort of, but no guarantee that the format is uppercase)</entry>
1395                         <entry><emphasis>VORM.</emphasis>
1396                         </entry>
1397                     </row>
1398                     <row>
1399                         <entry>B</entry>
1400                         <entry>Swatch インターネット時間</entry>
1401                         <entry><constant>Zend_Date::SWATCH</constant></entry>
1402                         <entry>なし</entry>
1403                         <entry><emphasis>1463</emphasis>
1404                         </entry>
1405                     </row>
1406                     <row>
1407                         <entry>g</entry>
1408                         <entry>時間 (1-12) (一桁あるいは二桁)</entry>
1409                         <entry><constant>Zend_Date::HOUR_SHORT_AM</constant></entry>
1410                         <entry>h</entry>
1411                         <entry><emphasis>2</emphasis>
1412                         </entry>
1413                     </row>
1414                     <row>
1415                         <entry>G</entry>
1416                         <entry>時間 (0-23) (一桁あるいは二桁)</entry>
1417                         <entry><constant>Zend_Date::HOUR_SHORT</constant></entry>
1418                         <entry>H</entry>
1419                         <entry><emphasis>2</emphasis>
1420                         </entry>
1421                     </row>
1422                     <row>
1423                         <entry>h</entry>
1424                         <entry>時間 (01-12) (二桁)</entry>
1425                         <entry><constant>Zend_Date::HOUR_AM</constant></entry>
1426                         <entry>hh</entry>
1427                         <entry><emphasis>02</emphasis>
1428                         </entry>
1429                     </row>
1430                     <row>
1431                         <entry>H</entry>
1432                         <entry>時間 (00-23) (二桁)</entry>
1433                         <entry><constant>Zend_Date::HOUR</constant></entry>
1434                         <entry>HH</entry>
1435                         <entry><emphasis>02</emphasis>
1436                         </entry>
1437                     </row>
1438                     <row>
1439                         <entry>i</entry>
1440                         <entry>分 (00-59) (二桁)</entry>
1441                         <entry><constant>Zend_Date::MINUTE</constant></entry>
1442                         <entry>mm</entry>
1443                         <entry><emphasis>02</emphasis>
1444                         </entry>
1445                     </row>
1446                     <row>
1447                         <entry>s</entry>
1448                         <entry>秒 (00-59) (二桁)</entry>
1449                         <entry><constant>Zend_Date::SECOND</constant></entry>
1450                         <entry>ss</entry>
1451                         <entry><emphasis>02</emphasis>
1452                         </entry>
1453                     </row>
1454                     <row>
1455                         <entry>e</entry>
1456                         <entry>タイムゾーン (地域化された完全形)</entry>
1457                         <entry><constant>Zend_Date::TIMEZONE_NAME</constant></entry>
1458                         <entry>zzzz</entry>
1459                         <entry><emphasis>Europe/Paris</emphasis>
1460                         </entry>
1461                     </row>
1462                     <row>
1463                         <entry>I</entry>
1464                         <entry>夏時間</entry>
1465                         <entry><constant>Zend_Date::DAYLIGHT</constant></entry>
1466                         <entry>なし</entry>
1467                         <entry><emphasis>1</emphasis>
1468                         </entry>
1469                     </row>
1470                     <row>
1471                         <entry>O</entry>
1472                         <entry>タイムゾーンの時差</entry>
1473                         <entry><constant>Zend_Date::GMT_DIFF</constant></entry>
1474                         <entry>Z、ZZ あるいは <constant>ZZZ</constant></entry>
1475                         <entry><emphasis>+0100</emphasis>
1476                         </entry>
1477                     </row>
1478                     <row>
1479                         <entry>P</entry>
1480                         <entry>タイムゾーンの時差 (分割形式)</entry>
1481                         <entry><constant>Zend_Date::GMT_DIFF_SEP</constant></entry>
1482                         <entry>ZZZZ</entry>
1483                         <entry><emphasis>+01:00</emphasis>
1484                         </entry>
1485                     </row>
1486                     <row>
1487                         <entry>T</entry>
1488                         <entry>タイムゾーン (地域化された省略形)</entry>
1489                         <entry><constant>Zend_Date::TIMEZONE</constant></entry>
1490                         <entry>z、zz あるいは zzz</entry>
1491                         <entry><emphasis>CET</emphasis>
1492                         </entry>
1493                     </row>
1494                     <row>
1495                         <entry>Z</entry>
1496                         <entry>タイムゾーンの時差秒数</entry>
1497                         <entry><constant>Zend_Date::TIMEZONE_SECS</constant></entry>
1498                         <entry>なし</entry>
1499                         <entry><emphasis>3600</emphasis>
1500                         </entry>
1501                     </row>
1502                     <row>
1503                         <entry>c</entry>
1504                         <entry>標準の Iso 書式の出力</entry>
1505                         <entry><constant>Zend_Date::ISO_8601</constant></entry>
1506                         <entry>なし</entry>
1507                         <entry><emphasis>2004-02-12T15:19:21+00:00</emphasis>
1508                         </entry>
1509                     </row>
1510                     <row>
1511                         <entry>r</entry>
1512                         <entry>標準の Rfc 2822 書式の出力</entry>
1513                         <entry><constant>Zend_Date::RFC_2822</constant></entry>
1514                         <entry>なし</entry>
1515                         <entry><emphasis>Thu, 21 Dec 2000 16:01:07 +0200</emphasis>
1516                         </entry>
1517                     </row>
1518                     <row>
1519                         <entry>U</entry>
1520                         <entry>Unix タイムスタンプ</entry>
1521                         <entry><constant>Zend_Date::TIMESTAMP</constant></entry>
1522                         <entry>なし</entry>
1523                         <entry><emphasis>15275422364</emphasis>
1524                         </entry>
1525                     </row>
1526                 </tbody>
1527             </tgroup>
1528         </table>
1530     </sect2>
1532 </sect1>