OSDN Git Service

(split) LDP: Update drafts based on LDP 3.52 release
[linuxjm/LDP_man-pages.git] / draft / man3 / strftime.3
index 5ae5c38..45ef621 100644 (file)
@@ -39,7 +39,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH STRFTIME 3 2012\-05\-10 GNU "Linux Programmer's Manual"
+.TH STRFTIME 3 2013\-06\-28 GNU "Linux Programmer's Manual"
 .SH 名前
 strftime \- 日付および時刻の文字列への変換
 .SH 書式
@@ -146,7 +146,8 @@ ISO\ 8601 週単位表記の年 (week\-based year; 「注意」の節を参照)
 午前・午後形式での時刻。 POSIX ロケールでは \fB%I:%M:%S %p\fP と等価である。(SU)
 .TP 
 \fB%R\fP
-24 時間表記での時刻、秒は表示しない (\fB%H:%M\fP)。 秒を含んだものは以下の \fB%T\fP を参照すること。(SU)
+The time in 24\-hour notation (\fB%H:%M\fP).  (SU)  For a version including the
+seconds, see \fB%T\fP below.
 .TP 
 \fB%s\fP
 紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数。 (TZ)
@@ -158,7 +159,7 @@ ISO\ 8601 週単位表記の年 (week\-based year; 「注意」の節を参照)
 タブ文字 (SU)
 .TP 
 \fB%T\fP
-24 時間表記の時間 (\fB%H:%M:%S\fP) (SU)
+The time in 24\-hour notation (\fB%H:%M:%S\fP).  (SU)
 .TP 
 \fB%u\fP
 週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1\-7)。 \fB%w\fP も参照。(SU)
@@ -193,7 +194,7 @@ ISO\ 8601 形式での年の始めからの週番号 (「注意」の節を参
 \fI+hhmm\fP や \fI\-hhmm\fP の形式のタイムゾーン (UTC へのオフセット時間)。(SU)
 .TP 
 \fB%Z\fP
-タイムゾーンまたはゾーン名または省略名。
+The timezone name or abbreviation.
 .TP 
 \fB%+\fP
 .\" Nov 05 -- Not in Linux/glibc, but is in some BSDs (according to
@@ -213,14 +214,18 @@ UNIX Specification) では \fB%Ec\fP, \fB%EC\fP, \fB%Ex\fP, \fB%EX\fP, \fB%Ey\fP
 .PP
 要素別の時刻構造体 \fItm\fP の詳細は \fI<time.h>\fP に定義されている。 \fBctime\fP(3)  も参照すること。
 .SH 返り値
-\fBstrftime\fP() 関数は文字列 \fIs\fP に格納されたバイト数を返す。このバイト
-数に終端の NULL バイトは含まない。終端の NULL バイトを格納できるだけの
-大きさを持った文字列を渡すこと。それ以外の場合は 0 を返し、文字列の内容
-は修正されない。 (libc 4.4.4 以降でこの挙動が適用されている。 libc
-4.4.1 などの非常に古いバージョンの libc では 文字列が短か過ぎた場合には
-\fImax\fP が返される。)
+Provided that the result string, including the terminating null byte, does
+not exceed \fImax\fP bytes, \fBstrftime\fP()  returns the number of bytes
+(excluding the terminating null byte)  placed in the array \fIs\fP.  If the
+length of the result string (including the terminating null byte)  would
+exceed \fImax\fP bytes, then \fBstrftime\fP()  returns 0, and the contents of the
+array are undefined.  (This behavior applies since at least libc 4.4.4; very
+old versions of libc, such as libc 4.4.1, would return \fImax\fP if the array
+was too small.)
 .LP
-返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。 例えば、多くのロケールでは \fB%p\fP は空文字列を返す。
+Note that the return value 0 does not necessarily indicate an error.  For
+example, in many locales \fB%p\fP yields an empty string.  An empty \fIformat\fP
+string will likewise yield an empty string.
 .SH 環境変数
 環境変数 \fBTZ\fP と \fBLC_TIME\fP が使用される。 (訳注: \fBLC_ALL\fP が設定されている場合には \fBLC_TIME\fP
 よりもそちらが優先される。 \fBLC_TIME\fP も \fBLC_ALL\fP も設定されていない場合には \fBLANG\fP が使用される。)
@@ -235,12 +240,19 @@ SUSv2 では、 \fB%S\fP は 00 から 61 の範囲をとると規定されて
 考慮してのものである (実際には、このような状況はこれまで一度も 起こっていない)。
 .SH 注意
 .SS "ISO\ 8601 の週・曜日表記 (Week Dates)"
-\fB%G\fP, \fB%g\fP, \fB%V\fP は、ISO\ 8601 標準により定義された週単位表記の年により 計算される値を出力する。 ISO\ 8601
-標準の週単位表記では、週は月曜日から開始され、 週番号は、年の最初の週が 01 となり、最後の週は 52 か 53 となる。 週 01 は、新しい年が
-4 日以上含まれる最初の週である。 言い換えると、週 01 は、その年の木曜日を含む最初の週、 つまり 1 月 4 日を含む週ということである。
-新しい年のカレンダー上の最初の週に新しい年が 3 日以下しか含まれない場合、 ISO\ 8601 の週単位表記では、これらの日を前の年の週 53
-の一部とみなす。 例えば、2010 年 1 月 1 日は金曜日であり、 その週には 2010 年の日が 3 日しか含まれない。 したがって、ISO\ 8601 の週単位表記では、これらの日は 2009 年 (\fB%G\fP)  の週 53 (\fB%V\fP) の一部となる。 ISO\ 8601 の 2010
-年の週 01 は 2010 年 1 月 4 日の月曜日から始まる。
+\fB%G\fP, \fB%g\fP, and \fB%V\fP yield values calculated from the week\-based year
+defined by the ISO\ 8601 standard.  In this system, weeks start on a Monday,
+and are numbered from 01, for the first week, up to 52 or 53, for the last
+week.  Week 1 is the first week where four or more days fall within the new
+year (or, synonymously, week 01 is: the first week of the year that contains
+a Thursday; or, the week that has 4 January in it).  When three of fewer
+days of the first calendar week of the new year fall within that year, then
+the ISO 8601 week\-based system counts those days as part of week 53 of the
+preceding year.  For example, 1 January 2010 is a Friday, meaning that just
+three days of that calendar week fall in 2010.  Thus, the ISO\ 8601
+week\-based system considers these days to be part of week 53 (\fB%V\fP)  of the
+year 2009 (\fB%G\fP); week 01 of ISO\ 8601 year 2010 starts on Monday, 4
+January 2010.
 .SS "glibc での注意"
 .\" HP-UX and Tru64 also have features like this.
 glibc では変換指定にいくつか拡張を行っている (これらの拡張は POSIX.1\-2001 には規定されていないが、
@@ -267,6 +279,11 @@ glibc では変換指定にいくつか拡張を行っている (これらの拡
 オプションの10進数の幅指定子はフラグの後ろに置くことができる (フラグはなくてもよい)。フィールドの本来の大きさが指定された幅よりも
 小さい場合、結果文字列の左側は指定された幅までパディングされる。
 .SH バグ
+If the output string would exceed \fImax\fP bytes, \fIerrno\fP is \fInot\fP set.
+This makes it impossible to distinguish this error case from cases where the
+\fIformat\fP string legitimately produces a zero\-length output string.
+POSIX.1\-2001 does \fInot\fP specify any \fIerrno\fP settings for \fBstrftime\fP().
+
 \fBgcc\fP(1)  のいくつかのバージョンにはおかしなところがあり、 \fB%c\fP の使用法について以下のような警告を出す: \fIwarning:
 `%c' yields only last 2 digits of year in some locales\fP
 (\fI警告:\fPいくつかのロケールでは\fI`%c'\fPは年の下2桁しか出力しない\fI)。\fP もちろんプログラマが \fB%c\fP
@@ -346,6 +363,6 @@ main(int argc, char *argv[])
 \fBdate\fP(1), \fBtime\fP(2), \fBctime\fP(3), \fBsetlocale\fP(3), \fBsprintf\fP(3),
 \fBstrptime\fP(3)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。