hirokawa Sun Mar 11 15:12:43 2001 EDT
Modified files:
/phpdoc/ja/functions datetime.xml ibase.xml readline.xml
Log:
update translation.
Index: phpdoc/ja/functions/datetime.xml
diff -u phpdoc/ja/functions/datetime.xml:1.18 phpdoc/ja/functions/datetime.xml:1.19
--- phpdoc/ja/functions/datetime.xml:1.18 Sat Feb 3 17:05:22 2001
+++ phpdoc/ja/functions/datetime.xml Sun Mar 11 15:12:43 2001
@@ -233,12 +233,38 @@
</example>
</para>
<para>
+ <function>date</function>
+フォーマットのいくつかの例を示します。
+
+現在の実装で特別な意味がある文字や今後のPHPのバージョンで意味が割
+
+り付けられるであろう文字については、望ましくない結果を避けるため
+
+にエスケープする必要があることに注意して下さい。エスケープをする
+ 際には、改行文字 \n
+のような文字を回避するためにシングルークオー
+ トを使用して下さい。
+ <example>
+ <title>
+ <function>date</function> によるフォーマット
+ </title>
+ <programlisting role="php">
+/* 今日は、March 10th, 2001, 5:16:18 pm です。 */
+$today = date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm
+$today = date("m.d.y"); // 03.10.01
+$today = date("j, g, Y"); // 10, 3, 2001
+$today = date("Ymd"); // 20010310
+$today = date('h-i-s, j-m-y, it is w Day z '); // 05-16-17, 10-03-01, 1631 1618 6
+Fripm01
+$today = date('\i\t \i\s \t\h\e jS \d\a\y.'); // It is the 10th day.
+$today = date("D M j g:i:s T Y"); // Sat Mar 10 15:16:08 MST 2001
+$today = date('H:m:s \m \i\s\ \m\o\n\t\h'); // 17:03:17 m is month
+$today = date("H:i:s"); // 17:16:17
+ </programlisting>
+ </example>
+ </para>
+ <para>
他の言語で日付をフォーマットするためには、
<function>setlocale</function> および <function>strftime</function>
関数を使用する必要があります。
</para>
<para>
- <function>gmdate</function>, <function>mktime</function>も参照下さい。
+ <function>gmdate</function>, <function>mktime</function>も参照下
+ さい。
</para>
</refsect1>
</refentry>
@@ -316,6 +342,16 @@
</simpara>
</listitem>
</itemizedlist>
+ <example>
+ <title><function>getdate</function> の例</title>
+ <programlisting>
+$today = getdate();
+$month = $today[month];
+$mday = $today[mday];
+$year = $today[year];
+echo "$month $mday, $year";
+ </programlisting>
+ </example>
</para>
</refsect1>
</refentry>
@@ -534,7 +570,7 @@
</listitem>
<listitem>
<simpara>
- "tm_year" - 年、y2k未対応
+ "tm_year" - 年、1900年からの年
</simpara>
</listitem>
<listitem>
@@ -577,6 +613,29 @@
(1970年1月1日 00:00:00)からの通算秒としたもので、msec は
マイクロ秒の部分です。この関数は、システムコール
gettimeofday() を
サポートするオペレーティング・システム上でのみ使用可能です。
+ </para>
+ <para>
+ 文字列は、ともに秒単位で返されます。
+ <example>
+ <title><function>microtime</function> の例</title>
+ <programlisting role="php">
+function getmicrotime(){
+ list($sec, $usec) = explode(" ",microtime());
+ return ($sec + $usec);
+ }
+
+$time_start = getmicrotime();
+
+for ($i=0; $i < 1000; $i++){
+ // 何もしない。1000 回ループ
+ }
+
+$time_end = getmicrotime();
+$time = $time_end - $time_start;
+
+echo "$time 秒間何もしませんでした。";
+ </programlisting>
+ </example>
</para>
<para>
<function>time</function>も参照下さい。
Index: phpdoc/ja/functions/ibase.xml
diff -u phpdoc/ja/functions/ibase.xml:1.12 phpdoc/ja/functions/ibase.xml:1.13
--- phpdoc/ja/functions/ibase.xml:1.12 Thu Jan 4 22:29:04 2001
+++ phpdoc/ja/functions/ibase.xml Sun Mar 11 15:12:43 2001
@@ -366,7 +366,7 @@
$rs=ibase_query("Select * from something");
$coln = ibase_num_fields($rs);
-for ($i=0 ; $i < $coln ; $i++) {
+for ($i=0 ; $i < $coln ; $i++) {
$col_info = ibase_field_info($rs, $i);
echo "name: ".$col_info['name']."\n";
echo "alias: ".$col_info['alias']."\n";
Index: phpdoc/ja/functions/readline.xml
diff -u phpdoc/ja/functions/readline.xml:1.3 phpdoc/ja/functions/readline.xml:1.4
--- phpdoc/ja/functions/readline.xml:1.3 Thu Jan 4 22:29:05 2001
+++ phpdoc/ja/functions/readline.xml Sun Mar 11 15:12:43 2001
@@ -47,8 +47,7 @@
<title><function>readline</function></title>
<programlisting role="php">
// ユーザから3回コマンドを取得
-for($i=0; $i < 3; $i++)
-{
+for ($i=0; $i < 3; $i++) {
$line = readline("Command: ");
readline_add_history($line);
}