OSDN Git Service

Merge pull request #42254 (amotoki/jm/work-strftime.3 into master).
authorAkihiro Motoki <amotoki@users.osdn.me>
Mon, 21 Jun 2021 15:35:40 +0000 (00:35 +0900)
committerAkihiro Motoki <amotoki@users.osdn.me>
Mon, 21 Jun 2021 15:35:40 +0000 (00:35 +0900)
manual/LDP_man-pages/add_ja/copyright/man3/strftime.3
manual/LDP_man-pages/draft/man3/strftime.3 [new file with mode: 0644]
manual/LDP_man-pages/po4a/time/po/ja.po
manual/LDP_man-pages/release/man3/strftime.3
manual/LDP_man-pages/stats/time
manual/LDP_man-pages/translation_list
manual/LDP_man-pages/untrans.html

index 7a69113..4fa97a6 100644 (file)
@@ -12,4 +12,5 @@ PO4A-HEADER: mode=before; position=^\.TH
 .\" Updated 2012-05-29, Akihiro MOTOKI <amotoki@gmail.com>
 .\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
 .\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2021-04-13, Akihiro Motoki <amotoki@gmail.com>
 .\"
diff --git a/manual/LDP_man-pages/draft/man3/strftime.3 b/manual/LDP_man-pages/draft/man3/strftime.3
new file mode 100644 (file)
index 0000000..af447a2
--- /dev/null
@@ -0,0 +1,418 @@
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\"     Linux libc source code
+.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\"     386BSD man pages
+.\"     GNU texinfo documentation on glibc date/time functions.
+.\" Modified Sat Jul 24 18:03:44 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Applied fix by Wolfgang Franke, aeb, 961011
+.\" Corrected return value, aeb, 970307
+.\" Added Single UNIX Spec conversions and %z, aeb/esr, 990329.
+.\" 2005-11-22 mtk, added Glibc Notes covering optional 'flag' and
+.\"           'width' components of conversion specifications.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2000 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated 2000-10-10, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" Updated 2002-01-09, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2002-01-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2005-02-26, Akihiro MOTOKI
+.\" Updated 2005-04-17, Akihiro MOTOKI
+.\" Updated 2005-12-05, Akihiro MOTOKI, LDP v2.16
+.\" Updated 2010-04-18, Akihiro MOTOKI, LDP v3.24
+.\" Updated 2012-05-29, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2021-04-13, Akihiro Motoki <amotoki@gmail.com>
+.\"
+.TH STRFTIME 3 " 2020\-08\-13" GNU "Linux Programmer's Manual"
+.SH 名前
+strftime \- 日付および時刻の文字列への変換
+.SH 書式
+.nf
+\fB#include <time.h>\fP
+.PP
+\fBsize_t strftime(char *\fP\fIs\fP\fB, size_t \fP\fImax\fP\fB, const char *\fP\fIformat\fP\fB,\fP
+\fB                const struct tm *\fP\fItm\fP\fB);\fP
+.fi
+.SH 説明
+.\" FIXME . POSIX says: Local timezone information is used as though
+.\" strftime() called tzset().  But this doesn't appear to be the case
+\fBstrftime\fP() 関数 は、要素別の時刻 \fItm\fP の内容を \fIformat\fP で指定された書式指定にしたがって変換し、長さ \fImax\fP
+の文字列 \fIs\fP に書き込む。要素別の時刻構造体 \fItm\fP は \fI<time.h>\fP で定義されている。 \fBctime\fP(3)
+も参照。
+.PP
+書式指定はヌル終端された文字列であり、「変換指定 (conversion
+specification)」と呼ばれる特別な文字列を含めることができる。各々の変換指定は \(aq%\(aq 文字で始まり、「変換指定文字
+(conversion specifier character)」と呼ばれる何らか他の文字で終端される。上記以外の全ての文字列は「通常の文字列
+(ordinary character sequence)」となる。
+.PP
+(NULL バイトも含む) 通常の文字列内の文字は、そのまま \fIformat\fP から \fIs\fP
+にコピーされる。一方、変換指定の文字は以下のリストに示すように置換される。このリストでは、 \fItm\fP
+構造体のフィールドが参照される場合、その情報も記載している。
+.TP 
+\fB%a\fP
+現在のロケールにおける曜日の省略名。 \fItm_wday\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
+\fBABDAY_\fP{\fB1\fP\(en\fB7\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
+.TP 
+\fB%A\fP
+現在のロケールにおける曜日の完全な名前。 \fItm_wday\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
+\fBDAY_\fP{\fB1\fP\(en\fB7\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
+.TP 
+\fB%b\fP
+現在のロケールにおける月の省略名。 \fItm_mon\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
+\fBABMON_\fP{\fB1\fP\(en\fB12\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
+.TP 
+\fB%B\fP
+現在のロケールにおける月の完全な名前。 \fItm_mon\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
+\fBMON_\fP{\fB1\fP\(en\fB12\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
+.TP 
+\fB%c\fP
+現在のロケールにおいて一般的な日付・時刻の表記。現在のロケールで使用される具体的なフォーマットは、 \fB%c\fP 変換指定の場合は \fBD_T_FMT\fP
+を、 \fB%Ec\fP 変換指定の場合は \fBERA_D_T_FMT\fP を引き数に指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
+POSIX ロケールでは \fB%a %b %e %H:%M:%S %Y\fP と等価である。
+.TP 
+\fB%C\fP
+世紀に対応する 2 桁の整数 (year/1000)。 \fB%EC\fP 変換指定は、西暦以外の年数表記 ("era") の名前に対応する。
+\fItm_year\fP から計算される。 (SU)
+.TP 
+\fB%d\fP
+月内通算日 (10 進数表記) (01\-31)。 \fItm_mday\fP から計算される。
+.TP 
+\fB%D\fP
+\fB%m/%d/%y\fP と等価。(うえっ、アメリカ専用だ。アメリカ以外の国では \fB%d/%m/%y\fP
+の方が一般的だ。紛らわしいので、使用すべきではない。) (SU)
+.TP 
+\fB%e\fP
+\fB%d\fP と同様に月内通算日を 10 進数で表現するが、 1 桁の場合 10 の位にゼロを置かずスペースを置く。 \fItm_mday\fP
+から計算される。 (SU)
+.TP 
+\fB%E\fP
+別形式 (西暦以外の年数表記; "era") を使用する際の修飾子。下記参照。 (SU)
+.TP 
+\fB%F\fP
+\fB%Y\-%m\-%d\fP と等価 (ISO\ 8601 形式の日付フォーマット)。 (C99)
+.TP 
+\fB%G\fP
+ISO\ 8601 の週 (ISO\ 8601 week) に基づく年の表示。「注意」の節を参照)。世紀も 10 進数で表す。 ISO 週番号
+(\fB%V\fP を参照) に対応した 4 桁の西暦年。 これは基本的には \fB%Y\fP と同じ形式だが、ISO
+週数が前年や翌年になる場合にはその年が使用される点が異なる。 \fItm_year\fP, \fItm_yday\fP, \fItm_wday\fP から計算される。
+(TZ)
+.TP 
+\fB%g\fP
+\fB%G\fP と同様。ただし、世紀を含まず下 2 桁のみを表示 (00\(en99)。 \fItm_year\fP, \fItm_yday\fP,
+\fItm_wday\fP から計算される。 (TZ)
+.TP 
+\fB%h\fP
+\fB%b\fP と等価 (SU)
+.TP 
+\fB%H\fP
+24 時間表記での時 (hour) (00\-23)。 \fItm_hour\fP から計算される。
+.TP 
+\fB%I\fP
+12 時間表記での時 (hour) (01\-12)。 \fItm_hour\fP から計算される。
+.TP 
+\fB%j\fP
+年の初めから通算の日数 (001\-366)。 \fItm_yday\fP から計算される。
+.TP 
+\fB%k\fP
+24 時間表記での時 (0\-23)。 1 桁の場合には前にゼロでなくスペースが置かれる。 \fB%H\fP も参照。 \fItm_hour\fP から計算される。
+(TZ)
+.TP 
+\fB%l\fP
+12 時間表記での時 (0\-12)。 1 桁の場合には前にゼロでなくスペースが置かれる。 \fB%I\fP も参照。 \fItm_hour\fP から計算される。
+(TZ)
+.TP 
+\fB%m\fP
+10 進数表記の月 (01\-12)。 \fItm_mon\fP から計算される。
+.TP 
+\fB%M\fP
+10 進数表記の分 (00\-59)。 \fItm_min\fP から計算される。
+.TP 
+\fB%n\fP
+改行 (SU)
+.TP 
+\fB%O\fP
+別の数値シンボルを使用する際の修飾子。下記参照。 (SU)
+.TP 
+\fB%p\fP
+現在のロケールにおける「午前」「午後」に相当する文字列。 英語の場合には "AM" または "PM" となる。
+正午は「午後」、真夜中は「午前」として扱われる。 \fItm_hour\fP から計算される。現在のロケールで "AM" と "PM"
+に対応する文字列表現は、それぞれ \fBAM_STR\fP と \fBPM_STR\fP を指定して \fBnl_langinfo\fP(3)
+を呼び出すことで取得できる。
+.TP 
+\fB%P\fP
+\fB%p\fP と同様であるが小文字が使用される。 "am" や "pm"、もしくは現在のロケールでの対応する文字列となる。 \fItm_hour\fP
+から計算される。 (GNU)
+.TP 
+\fB%r\fP
+午前・午後形式での時刻。現在のロケールで使用される具体的なフォーマットは、引き数に \fBT_FMT_AMPM\fP を指定して
+\fBnl_langinfo\fP(3) を呼び出すことで取得できる。 POSIX ロケールでは \fB%I:%M:%S %p\fP と等価である。 (SU)
+.TP 
+\fB%R\fP
+24 時間表記での時刻、秒は表示しない (\fB%H:%M\fP)。 秒を含んだものは以下の \fB%T\fP を参照すること。(SU)
+.TP 
+\fB%s\fP
+紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数。 \fImktime(tm)\fP から計算される。
+(TZ)
+.TP 
+\fB%S\fP
+秒 (10 進数表記) (00\-60)。時々ある閏秒に対応するため、値の範囲は 60 までとなっている。 \fItm_sec\fP から計算される。
+.TP 
+\fB%t\fP
+タブ文字 (SU)
+.TP 
+\fB%T\fP
+24 時間表記の時間 (\fB%H:%M:%S\fP) (SU)
+.TP 
+\fB%u\fP
+週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1\-7)。 \fB%w\fP も参照。 \fItm_wday\fP から計算される。 (SU)
+.TP 
+\fB%U\fP
+年の初めからの通算の週番号 (10 進数表記) (00\-53)。 その年の最初の日曜日を、第 1 週の始まりとして計算する。 \fB%V\fP と \fB%W\fP
+も参照すること。 \fItm_yday\fP と \fItm_wday\fP から計算される。
+.TP 
+\fB%V\fP
+ISO\ 8601 形式での年の始めからの週番号 (「注意」の節を参照)。 10 進数表記で、01 から 53
+の値となる。週番号は、新しい年が少なくとも 4 日以上含まれる最初の週を 1 として計算する。 \fB%U\fP と \fB%W\fP も参照のこと。
+\fItm_year\fP, \fItm_yday\fP, \fItm_wday\fP から計算される。 (SU)
+.TP 
+\fB%w\fP
+週の何番目の日 (10 進数表記) か。日曜日を 0 とする。(0\-6)。 \fB%u\fP も参照。 \fItm_wday\fP から計算される。
+.TP 
+\fB%W\fP
+年の初めからの通算の週番号 (10 進数表記) (00\-53)。 その年の最初の月曜日を、第 1 週の始まりとして計算する。 \fB%V\fP と \fB%W\fP
+も参照すること。 \fItm_yday\fP と \fItm_wday\fP から計算される。
+.TP 
+\fB%x\fP
+現在のロケールで一般的な日付表記。時刻は含まない。現在のロケールで使用される具体的なフォーマットは、 \fB%x\fP 変換指定の場合は \fBD_FMT\fP
+を、 \fB%Ex\fP 変換指定の場合は \fBERA_D_FMT\fP を引き数に指定して、 \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
+POSIX ロケールでは、これは \fB%m/%d/%y\fP と等価である。
+.TP 
+\fB%X\fP
+現在のロケールで一般的な時刻表記。日付は含まない。現在のロケールで使用される具体的なフォーマットは、 \fB%X\fP 変換指定の場合は \fBT_FMT\fP
+を、 \fB%EX\fP 変換指定の場合は \fBERA_T_FMT\fP を引き数に指定して、 \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
+POSIX ロケールでは、これは \fB%H:%M:%S\fP と等価である。
+.TP 
+\fB%y\fP
+西暦の下 2 桁 (世紀部分を含まない年) (00 から 99)。 \fB%Ey\fP 変換指定は。 \fB%EC\fP 変換指定で示される西暦以外の年数表記
+("era") における初めからの年数に対応する。 \fItm_year\fP から計算される。
+.TP 
+\fB%Y\fP
+世紀部分を含めた 10 進表記の西暦年。 \fB%EY\fP 変換指定は別形式の年表記の完全な表現に対応する。 \fItm_year\fP から計算される。
+.TP 
+\fB%z\fP
+\fI+hhmm\fP や \fI\-hhmm\fP の形式のタイムゾーン (UTC へのオフセット時間)。(SU)
+.TP 
+\fB%Z\fP
+タイムゾーン名または省略名。
+.TP 
+\fB%+\fP
+.\" Nov 05 -- Not in Linux/glibc, but is in some BSDs (according to
+.\" their man pages)
+\fBdate\fP(1) 形式での日時。 glibc2 ではサポートされていない。 (TZ)
+.TP 
+\fB%%\fP
+\(aq%\(aq 文字
+.PP
+いくつかの変換指定では、変換指定文字の前に \fBE\fP や \fBO\fP 「修飾子」を置くことによって別書式を使用するように指定することができる。
+現在のロケールにおいて別書式が存在しない場合には、 通常の変換指定が使用されたかのように動作する (SU)。 統一 UNIX 規格 (Single
+UNIX Specification) では \fB%Ec\fP, \fB%EC\fP, \fB%Ex\fP, \fB%EX\fP, \fB%Ey\fP, \fB%EY\fP,
+\fB%Od\fP, \fB%Oe\fP, \fB%OH\fP, \fB%OI\fP, \fB%Om\fP, \fB%OM\fP, \fB%OS\fP, \fB%Ou\fP, \fB%OU\fP,
+\fB%OV\fP, \fB%Ow\fP, \fB%OW\fP, \fB%Oy\fP, について記述がある。ここで \fBO\fP 修飾子は別形式の数値シンボル (ローマ数字とか)
+を指定するために使用する。 \fBE\fP 修飾子はロケール依存の別表現を指定するのに使用する。 \fBE\fP
+修飾子を使った場合のデータ表現に適用されるルールは、 \fBnl_langinfo\fP(3) の引き数に \fBERA\fP
+を指定することで取得できる。このような別表現の例としては \fBja_JP\fP glibc ロケールでの日本の年号 (「昭和」「平成」など)
+によるカレンダー表記がある。
+.SH 返り値
+.\" (This behavior applies since at least libc 4.4.4;
+.\" very old versions of libc, such as libc 4.4.1,
+.\" would return
+.\" .I max
+.\" if the array was too small.)
+終端のヌルバイトを含めた結果の文字列の長さが \fImax\fP バイトを超えなかった場合、 \fBstrftime\fP() 関数は配列 \fIs\fP
+に格納されたバイト数を返す (このバイト数に終端のヌルバイトは含まれない)。 終端のヌルバイトを含めた結果の文字列の長さが \fImax\fP
+バイトを超える場合には、 \fBstrftime\fP() は 0 を返し、配列の内容は不定となる。
+.PP
+返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。例えば、多くのロケールでは \fB%p\fP は空文字列を返す。同様に、空の
+\fIformat\fP 文字列は空文字列を返す。
+.SH 環境変数
+環境変数 \fBTZ\fP と \fBLC_TIME\fP が使用される。 (訳注: \fBLC_ALL\fP が設定されている場合には \fBLC_TIME\fP
+よりもそちらが優先される。 \fBLC_TIME\fP も \fBLC_ALL\fP も設定されていない場合には \fBLANG\fP が使用される。)
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBstrftime\fP()
+T}     Thread safety   MT\-Safe env locale
+.TE
+.SH 準拠
+.\" FIXME strftime() is in POSIX.1-2001 and POSIX.1-2008, but the details
+.\" in the standards changed across versions. Investigate and
+.\" write up.
+SVr4, C89, C99. 個々の変換が厳密にどの規格に含まれるかをマークで示している。「マークなし」は ANSI C、「SU」は統一 UNIX
+規格を、「TZ」は Olson の timezone パッケージ、「GNU」は glibc を示す。 glibc2 では \fB%+\fP
+はサポートされていないが、 いくつかの拡張が行われている。POSIX.1 では ANSI C のみを参照している。 POSIX.2 の
+\fBdate\fP(1)  のところに記述されている幾つかの拡張は \fBstrftime\fP() にも適用できるだろう。 \fB%F\fP 変換は C99 と
+POSIX.1\-2001 にある。
+.PP
+SUSv2 では、 \fB%S\fP は 00 から 61 の範囲をとると規定されている。 これは、1 分間のうち閏秒が 2
+つ入る可能性が理論的にはあることを考慮してのものである (実際には、このような状況はこれまで一度も 起こっていない)。
+.SH 注意
+.SS "ISO\ 8601 の暦週日付"
+\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 日の月曜日から始まる。同様に、 2011 年 1 月の最初の 2 日は 2010 年の週 52
+の一部とみなされる。
+.SS "glibc での注意"
+.\" HP-UX and Tru64 also have features like this.
+glibc では変換指定にいくつか拡張を行っている (これらの拡張は POSIX.1\-2001 には規定されていないが、
+他のいくつかのシステムで同様の機能が提供されている)。 \(aq%\(aq 文字と変換指定文字の間に、オプションとして \fIフラグ\fP とフィールドの
+\fI幅\fP を指定できる (これらを指定する場合には \fBE\fP や \fBO\fP 修飾子の前に置く)。
+.PP
+以下のフラグ文字が使用できる。
+.TP 
+\fB_\fP
+(下線)  数値の結果文字列のパディング (穴埋め) をスペース (空白文字) で行う。
+.TP 
+\fB\-\fP
+(ダッシュ)  数値の結果文字列に対するパディングを行わない。
+.TP 
+\fB0\fP
+変換指定文字がデフォルトではスペースでパディングを行う場合でも、 数値の結果文字列へのパディングを 0 で行う。
+.TP 
+\fB\(ha\fP
+結果文字列中のアルファベット文字を大文字に変換する。
+.TP 
+\fB#\fP
+結果文字列の大文字・小文字を入れ替える (このフラグは特定の変換指定文字でしか機能しない。その中でも 本当に有用なのは \fB%Z\fP の場合だけである)。
+.PP
+オプションの 10 進数の幅指定子はフラグの後ろに置くことができる (フラグはなくてもよい)。フィールドの本来の大きさが指定された幅よりも
+小さい場合、結果文字列の左側は指定された幅までパディングされる。
+.SH バグ
+出力文字列が \fImax\fP バイトを超えてしまう場合、 \fIerrno\fP は設定「されない」。 このため、このエラーと、 \fIformat\fP
+文字列がきちんと処理されて長さ 0 の出力文字列が生成される場合、を区別することができない。 POSIX.1\-2001 では \fBstrftime\fP()
+に関して \fIerrno\fP に設定される値について一切規定して「いない」。
+.PP
+\fBgcc\fP(1)  のいくつかのバージョンにはおかしなところがあり、 \fB%c\fP の使用法について以下のような警告を出す: \fIwarning:
+`%c\(aq yields only last 2 digits of year in some locales\fP (\fI警告:\fP
+いくつかのロケールでは \fI`%c\(aq\fP は年の下2桁しか出力しない\fI)。\fP もちろんプログラマが \fB%c\fP を使うのはお薦めできることである。
+\fB%c\fP を使うと適切な日付と時刻の表記を得ることができるからである。 \fBgcc\fP(1)
+のこの問題を回避しようとすると、何かすっきりしない気分になるだろう。 比較的きれいな回避策は以下のような中間関数を追加することである。
+.PP
+.in +4n
+.EX
+size_t
+my_strftime(char *s, size_t max, const char *fmt,
+            const struct tm *tm)
+{
+    return strftime(s, max, fmt, tm);
+}
+.EE
+.in
+.PP
+現在では、 \fBgcc\fP(1)  はこの警告を抑えるための \fI\-Wno\-format\-y2k\fP オプションを
+提供しており、上記の回避策はもはや必要ない。
+.SH 例
+\fBRFC\ 2822 準拠の日付形式\fP (%a と %b は英語ロケール)
+.PP
+.in +4n
+.EX
+ "%a,\ %d\ %b\ %Y\ %T\ %z"
+.EE
+.in
+.PP
+\fBRFC\ 822 準拠の日付形式\fP (%a と %b は英語ロケール)
+.PP
+.in +4n
+.EX
+ "%a,\ %d\ %b\ %y\ %T\ %z"
+.EE
+.in
+.SS サンプルプログラム
+以下のプログラムを使うと \fBstrftime\fP() の実験ができる。
+.PP
+以下に \fBstrftime\fP() の glibc 実装が生成する結果の例をいくつか示す。
+.PP
+.in +4n
+.EX
+$\fB ./a.out \(aq%m\(aq\fP
+Result string is "11"
+$\fB ./a.out \(aq%5m\(aq\fP
+Result string is "00011"
+$\fB ./a.out \(aq%_5m\(aq\fP
+Result string is "   11"
+.EE
+.in
+.SS プログラムのソース
+\&
+.EX
+#include <time.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main(int argc, char *argv[])
+{
+    char outstr[200];
+    time_t t;
+    struct tm *tmp;
+
+    t = time(NULL);
+    tmp = localtime(&t);
+    if (tmp == NULL) {
+        perror("localtime");
+        exit(EXIT_FAILURE);
+    }
+
+    if (strftime(outstr, sizeof(outstr), argv[1], tmp) == 0) {
+        fprintf(stderr, "strftime returned 0");
+        exit(EXIT_FAILURE);
+    }
+
+    printf("Result string is \e"%s\e"\en", outstr);
+    exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+ \fBdate\fP(1), \fBtime\fP(2), \fBctime\fP(3), \fBnl_langinfo\fP(3), \fBsetlocale\fP(3),
+\fBsprintf\fP(3), \fBstrptime\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index cb67d0f..98b1518 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "POT-Creation-Date: 2021-03-12 14:01+0900\n"
-"PO-Revision-Date: 2021-04-09 18:21+0900\n"
+"PO-Revision-Date: 2021-05-02 05:13+0900\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
@@ -6236,19 +6236,12 @@ msgstr ""
 #.  strftime() called tzset().  But this doesn't appear to be the case
 #. type: Plain text
 #: build/C/man3/strftime.3:67
-#, fuzzy
-#| msgid ""
-#| "The B<strftime>()  function formats the broken-down time I<tm> according "
-#| "to the format specification I<format> and places the result in the "
-#| "character array I<s> of size I<max>."
 msgid ""
 "The B<strftime>()  function formats the broken-down time I<tm> according to "
 "the format specification I<format> and places the result in the character "
 "array I<s> of size I<max>.  The broken-down time structure I<tm> is defined "
 "in I<E<lt>time.hE<gt>>.  See also B<ctime>(3)."
-msgstr ""
-"B<strftime>()  関数 は、要素別の時刻 I<tm> の内容を I<format> で指定された書"
-"式指定にしたがって変換し、 長さ I<max> の文字列 I<s> に書き込む。"
+msgstr "B<strftime>() 関数 は、要素別の時刻 I<tm> の内容を I<format> で指定された書式指定にしたがって変換し、長さ I<max> の文字列 I<s> に書き込む。要素別の時刻構造体 I<tm> は I<E<lt>time.hE<gt>> で定義されている。 B<ctime>(3) も参照。"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:76
@@ -6258,28 +6251,16 @@ msgid ""
 "introduced by a \\(aq%\\(aq character and terminated by some other character "
 "known as a I<conversion specifier character>.  All other character sequences "
 "are I<ordinary character sequences>."
-msgstr ""
-"書式指定はヌル終端された文字列であり、 「変換指定 (conversion "
-"specification)」と呼ばれる特別な文字列を 含まることができる。 各々の変換指定"
-"は \\(aq%\\(aq 文字で始まり、 「変換指定文字 (conversion specifier "
-"character)」と呼ばれる 何らか他の文字で終端される。上記以外の全ての文字列は "
-"「通常の文字列 (ordinary character sequence)」となる。"
+msgstr "書式指定はヌル終端された文字列であり、「変換指定 (conversion specification)」と呼ばれる特別な文字列を含めることができる。各々の変換指定は \\(aq%\\(aq 文字で始まり、「変換指定文字 (conversion specifier character)」と呼ばれる何らか他の文字で終端される。上記以外の全ての文字列は「通常の文字列 (ordinary character sequence)」となる。"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:87
-#, fuzzy
-#| msgid ""
-#| "The characters of ordinary character sequences (including the null byte)  "
-#| "are copied verbatim from I<format> to I<s>.  However, the characters of "
-#| "conversion specifications are replaced as follows:"
 msgid ""
 "The characters of ordinary character sequences (including the null byte)  "
 "are copied verbatim from I<format> to I<s>.  However, the characters of "
 "conversion specifications are replaced as shown in the list below.  In this "
 "list, the field(s) employed from the I<tm> structure are also shown."
-msgstr ""
-"(NULL バイトも含む) 通常の文字列内の文字は、 そのまま I<format> から I<s> に"
-"コピーされる。 一方、変換指定の文字は以下のように置換される。"
+msgstr "(NULL バイトも含む) 通常の文字列内の文字は、そのまま I<format> から I<s> にコピーされる。一方、変換指定の文字は以下のリストに示すように置換される。このリストでは、 I<tm> 構造体のフィールドが参照される場合、その情報も記載している。"
 
 #. type: TP
 #: build/C/man3/strftime.3:87
@@ -6294,7 +6275,7 @@ msgid ""
 "locale.  (Calculated from I<tm_wday>.)  (The specific names used in the "
 "current locale can be obtained by calling B<nl_langinfo>(3)  with "
 "B<ABDAY_>{B<1>\\(enB<7>} as an argument.)"
-msgstr ""
+msgstr "現在のロケールにおける曜日の省略名。 I<tm_wday> から計算される。現在のロケールで使用される具体的な名前は、引き数に B<ABDAY_>{B<1>\\(enB<7>} を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。"
 
 #. type: TP
 #: build/C/man3/strftime.3:97
@@ -6309,7 +6290,7 @@ msgid ""
 "(Calculated from I<tm_wday>.)  (The specific names used in the current "
 "locale can be obtained by calling B<nl_langinfo>(3)  with B<DAY_>{B<1>"
 "\\(enB<7>} as an argument.)"
-msgstr ""
+msgstr "現在のロケールにおける曜日の完全な名前。 I<tm_wday> から計算される。現在のロケールで使用される具体的な名前は、引き数に B<DAY_>{B<1>\\(enB<7>} を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。"
 
 #. type: TP
 #: build/C/man3/strftime.3:107
@@ -6324,7 +6305,7 @@ msgid ""
 "from I<tm_mon>.)  (The specific names used in the current locale can be "
 "obtained by calling B<nl_langinfo>(3)  with B<ABMON_>{B<1>\\(enB<12>} as an "
 "argument.)"
-msgstr ""
+msgstr "現在のロケールにおける月の省略名。 I<tm_mon> から計算される。現在のロケールで使用される具体的な名前は、引き数に B<ABMON_>{B<1>\\(enB<12>} を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。"
 
 #. type: TP
 #: build/C/man3/strftime.3:117
@@ -6338,7 +6319,7 @@ msgid ""
 "The full month name according to the current locale.  (Calculated from "
 "I<tm_mon>.)  (The specific names used in the current locale can be obtained "
 "by calling B<nl_langinfo>(3)  with B<MON_>{B<1>\\(enB<12>} as an argument.)"
-msgstr ""
+msgstr "現在のロケールにおける月の完全な名前。 I<tm_mon> から計算される。現在のロケールで使用される具体的な名前は、引き数に B<MON_>{B<1>\\(enB<12>} を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。"
 
 #. type: TP
 #: build/C/man3/strftime.3:127 build/C/man3/strptime.3:127
@@ -6356,7 +6337,7 @@ msgid ""
 "specification, and with B<ERA_D_T_FMT> for the B<%Ec> conversion "
 "specification.)  (In the POSIX locale this is equivalent to B<%a %b %e %H:%M:"
 "%S %Y>.)"
-msgstr ""
+msgstr "現在のロケールにおいて一般的な日付・時刻の表記。現在のロケールで使用される具体的なフォーマットは、 B<%c> 変換指定の場合は B<D_T_FMT> を、 B<%Ec> 変換指定の場合は B<ERA_D_T_FMT> を引き数に指定して B<nl_langinfo>(3) を呼び出すことで取得できる。 POSIX ロケールでは B<%a %b %e %H:%M:%S %Y> と等価である。"
 
 #. type: TP
 #: build/C/man3/strftime.3:143 build/C/man3/strptime.3:130
@@ -6371,7 +6352,7 @@ msgid ""
 "The century number (year/100) as a 2-digit integer. (SU)  (The B<%EC> "
 "conversion specification corresponds to the name of the era.)  (Calculated "
 "from I<tm_year>.)"
-msgstr ""
+msgstr "世紀に対応する 2 桁の整数 (year/1000)。 B<%EC> 変換指定は、西暦以外の年数表記 (\"era\") の名前に対応する。 I<tm_year> から計算される。 (SU)"
 
 #. type: TP
 #: build/C/man3/strftime.3:151
@@ -6381,12 +6362,10 @@ msgstr "B<%d>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:156
-#, fuzzy
-#| msgid "The day of the month as a decimal number (range 01 to 31)."
 msgid ""
 "The day of the month as a decimal number (range 01 to 31).  (Calculated from "
 "I<tm_mday>.)"
-msgstr "月内通算日 (10 進数表記) (01-31)。"
+msgstr "月内通算日 (10 進数表記) (01-31)。 I<tm_mday> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:156 build/C/man3/strptime.3:136
@@ -6402,9 +6381,7 @@ msgid ""
 "note that in other countries B<%d/%m/%y> is rather common.  This means that "
 "in international context this format is ambiguous and should not be used.) "
 "(SU)"
-msgstr ""
-"B<%m/%d/%y> と等価。(うえっ、アメリカ専用だ。アメリカ以外の国では B<%d/%m/"
-"%y> の方が一般的だ。紛らわしいので、使用すべきではない。) (SU)"
+msgstr "B<%m/%d/%y> と等価。(うえっ、アメリカ専用だ。アメリカ以外の国では B<%d/%m/%y> の方が一般的だ。紛らわしいので、使用すべきではない。) (SU)"
 
 #. type: TP
 #: build/C/man3/strftime.3:166 build/C/man1/time.1:144
@@ -6414,16 +6391,10 @@ msgstr "B<%e>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:174
-#, fuzzy
-#| msgid ""
-#| "Like B<%d>, the day of the month as a decimal number, but a leading zero "
-#| "is replaced by a space. (SU)"
 msgid ""
 "Like B<%d>, the day of the month as a decimal number, but a leading zero is "
 "replaced by a space. (SU)  (Calculated from I<tm_mday>.)"
-msgstr ""
-"B<%d> と同様に月内通算日を 10 進数で表現するが、 1 桁の場合 10 の位にゼロを置"
-"かずスペースを置く。(SU)"
+msgstr "B<%d> と同様に月内通算日を 10 進数で表現するが、 1 桁の場合 10 の位にゼロを置かずスペースを置く。 I<tm_mday> から計算される。 (SU)"
 
 #. type: TP
 #: build/C/man3/strftime.3:174 build/C/man1/time.1:141
@@ -6433,10 +6404,8 @@ msgstr "B<%E>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:177
-#, fuzzy
-#| msgid "Modifier: use alternative format, see below. (SU)"
 msgid "Modifier: use alternative (\"era-based\") format, see below. (SU)"
-msgstr "別形式を使用する際の修飾子。下記参照。 (SU)"
+msgstr "別形式 (西暦以外の年数表記; \"era\") を使用する際の修飾子。下記参照。 (SU)"
 
 #. type: TP
 #: build/C/man3/strftime.3:177 build/C/man3/strptime.3:361
@@ -6458,24 +6427,13 @@ msgstr "B<%G>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:196
-#, fuzzy
-#| msgid ""
-#| "The ISO\\ 8601 week-based year (see NOTES) with century as a decimal "
-#| "number.  The 4-digit year corresponding to the ISO week number (see B<"
-#| "%V>).  This has the same format and value as B<%Y>, except that if the "
-#| "ISO week number belongs to the previous or next year, that year is used "
-#| "instead. (TZ)"
 msgid ""
 "The ISO\\ 8601 week-based year (see NOTES) with century as a decimal "
 "number.  The 4-digit year corresponding to the ISO week number (see B<%V>).  "
 "This has the same format and value as B<%Y>, except that if the ISO week "
 "number belongs to the previous or next year, that year is used instead. "
 "(TZ)  (Calculated from I<tm_year>, I<tm_yday>, and I<tm_wday>.)"
-msgstr ""
-"ISO\\ 8601 週単位表記の年 (week-based year; 「注意」の節を参照)。 世紀も 10 "
-"進数で表す。 ISO 週番号 (B<%V> を参照) に対応した 4 桁の西暦年。 これは基本的"
-"には B<%Y> と同じ形式だが、ISO 週数が前年や翌年になる 場合にはその年が使用さ"
-"れる点が異なる。(TZ)"
+msgstr "ISO\\ 8601 の週 (ISO\\ 8601 week) に基づく年の表示。「注意」の節を参照)。世紀も 10 進数で表す。 ISO 週番号 (B<%V> を参照) に対応した 4 桁の西暦年。 これは基本的には B<%Y> と同じ形式だが、ISO 週数が前年や翌年になる場合にはその年が使用される点が異なる。 I<tm_year>, I<tm_yday>, I<tm_wday> から計算される。 (TZ)"
 
 #. type: TP
 #: build/C/man3/strftime.3:196 build/C/man3/strptime.3:366
@@ -6485,14 +6443,10 @@ msgstr "B<%g>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:206
-#, fuzzy
-#| msgid ""
-#| "Like B<%G>, but without century, that is, with a 2-digit year (00-99). "
-#| "(TZ)"
 msgid ""
 "Like B<%G>, but without century, that is, with a 2-digit year (00\\(en99). "
 "(TZ)  (Calculated from I<tm_year>, I<tm_yday>, and I<tm_wday>.)"
-msgstr "B<%G> と同様。但し、世紀を含まず下 2 桁のみを表示 (00-99)。 (TZ)"
+msgstr "B<%G> と同様。ただし、世紀を含まず下 2 桁のみを表示 (00\\(en99)。 I<tm_year>, I<tm_yday>, I<tm_wday> から計算される。 (TZ)"
 
 #. type: TP
 #: build/C/man3/strftime.3:206
@@ -6513,12 +6467,10 @@ msgstr "B<%H>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:216
-#, fuzzy
-#| msgid "The hour as a decimal number using a 24-hour clock (range 00 to 23)."
 msgid ""
 "The hour as a decimal number using a 24-hour clock (range 00 to 23).  "
 "(Calculated from I<tm_hour>.)"
-msgstr "24 時間表記での時 (hour)。 (00-23)"
+msgstr "24 時間表記での時 (hour) (00-23)。 I<tm_hour> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:216 build/C/man3/strptime.3:149
@@ -6529,12 +6481,10 @@ msgstr "B<%I>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:221
-#, fuzzy
-#| msgid "The hour as a decimal number using a 12-hour clock (range 01 to 12)."
 msgid ""
 "The hour as a decimal number using a 12-hour clock (range 01 to 12).  "
 "(Calculated from I<tm_hour>.)"
-msgstr "12 時間表記での時 (hour)。 (01-12)"
+msgstr "12 時間表記での時 (hour) (01-12)。 I<tm_hour> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:221 build/C/man3/strptime.3:152
@@ -6544,12 +6494,10 @@ msgstr "B<%j>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:226
-#, fuzzy
-#| msgid "The day of the year as a decimal number (range 001 to 366)."
 msgid ""
 "The day of the year as a decimal number (range 001 to 366).  (Calculated "
 "from I<tm_yday>.)"
-msgstr "年の初めから通算の日数。 (001-366)"
+msgstr "年の初めから通算の日数 (001-366)。 I<tm_yday> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:226 build/C/man1/time.1:225
@@ -6559,17 +6507,11 @@ msgstr "B<%k>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:235
-#, fuzzy
-#| msgid ""
-#| "The hour (24-hour clock) as a decimal number (range 0 to 23); single "
-#| "digits are preceded by a blank.  (See also B<%H>.)  (TZ)"
 msgid ""
 "The hour (24-hour clock) as a decimal number (range 0 to 23); single digits "
 "are preceded by a blank.  (See also B<%H>.)  (Calculated from I<tm_hour>.)  "
 "(TZ)"
-msgstr ""
-"24 時間表記での時 (0-23)。 1 桁の場合には前にゼロでなくスペースが置かれる。 "
-"(B<%H> も参照) (TZ)"
+msgstr "24 時間表記での時 (0-23)。 1 桁の場合には前にゼロでなくスペースが置かれる。 B<%H> も参照。 I<tm_hour> から計算される。 (TZ)"
 
 #. type: TP
 #: build/C/man3/strftime.3:235
@@ -6579,17 +6521,11 @@ msgstr "B<%l>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:244
-#, fuzzy
-#| msgid ""
-#| "The hour (12-hour clock) as a decimal number (range 1 to 12); single "
-#| "digits are preceded by a blank.  (See also B<%I>.)  (TZ)"
 msgid ""
 "The hour (12-hour clock) as a decimal number (range 1 to 12); single digits "
 "are preceded by a blank.  (See also B<%I>.)  (Calculated from I<tm_hour>.)  "
 "(TZ)"
-msgstr ""
-"12 時間表記での時 (0-12)。 1 桁の場合には前にゼロでなくスペースが置かれる。 "
-"(B<%I> も参照) (TZ)"
+msgstr "12 時間表記での時 (0-12)。 1 桁の場合には前にゼロでなくスペースが置かれる。 B<%I> も参照。 I<tm_hour> から計算される。 (TZ)"
 
 #. type: TP
 #: build/C/man3/strftime.3:244 build/C/man3/strptime.3:155
@@ -6599,11 +6535,9 @@ msgstr "B<%m>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:249
-#, fuzzy
-#| msgid "The month as a decimal number (range 01 to 12)."
 msgid ""
 "The month as a decimal number (range 01 to 12).  (Calculated from I<tm_mon>.)"
-msgstr "月 (10 進数表記)。 (01-12)"
+msgstr "10 進数表記の月 (01-12)。 I<tm_mon> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:249 build/C/man3/strptime.3:158
@@ -6614,12 +6548,10 @@ msgstr "B<%M>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:254
-#, fuzzy
-#| msgid "The minute as a decimal number (range 00 to 59)."
 msgid ""
 "The minute as a decimal number (range 00 to 59).  (Calculated from "
 "I<tm_min>.)"
-msgstr "分 (10 進数表記) (00-59)"
+msgstr "10 進数表記の分 (00-59)。 I<tm_min> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:254 build/C/man3/strptime.3:161
@@ -6630,7 +6562,7 @@ msgstr "B<%n>"
 #. type: Plain text
 #: build/C/man3/strftime.3:257
 msgid "A newline character. (SU)"
-msgstr "改行 (SU)"
+msgstr "改行 (SU)"
 
 #. type: TP
 #: build/C/man3/strftime.3:257 build/C/man1/time.1:216
@@ -6640,10 +6572,8 @@ msgstr "B<%O>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:260
-#, fuzzy
-#| msgid "Modifier: use alternative format, see below. (SU)"
 msgid "Modifier: use alternative numeric symbols, see below. (SU)"
-msgstr "別形式を使用する際の修飾子。下記参照。 (SU)"
+msgstr "別の数値シンボルを使用する際の修飾子。下記参照。 (SU)"
 
 #. type: TP
 #: build/C/man3/strftime.3:260 build/C/man3/strptime.3:164
@@ -6654,11 +6584,6 @@ msgstr "B<%p>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:273
-#, fuzzy
-#| msgid ""
-#| "Either \"AM\" or \"PM\" according to the given time value, or the "
-#| "corresponding strings for the current locale.  Noon is treated as \"PM\" "
-#| "and midnight as \"AM\"."
 msgid ""
 "Either \"AM\" or \"PM\" according to the given time value, or the "
 "corresponding strings for the current locale.  Noon is treated as \"PM\" and "
@@ -6666,9 +6591,7 @@ msgid ""
 "representations used for \"AM\" and \"PM\" in the current locale can be "
 "obtained by calling B<nl_langinfo>(3)  with B<AM_STR> and B<PM_STR>, "
 "respectively.)"
-msgstr ""
-"現在のロケールにおける「午前」「午後」に相当する文字列。 英語の場合には \"AM"
-"\" または \"PM\" となる。 正午は「午後」、真夜中は「午前」として扱われる。"
+msgstr "現在のロケールにおける「午前」「午後」に相当する文字列。 英語の場合には \"AM\" または \"PM\" となる。 正午は「午後」、真夜中は「午前」として扱われる。 I<tm_hour> から計算される。現在のロケールで \"AM\" と \"PM\" に対応する文字列表現は、それぞれ B<AM_STR> と B<PM_STR> を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。"
 
 #. type: TP
 #: build/C/man3/strftime.3:273 build/C/man1/time.1:155
@@ -6678,16 +6601,10 @@ msgstr "B<%P>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:282
-#, fuzzy
-#| msgid ""
-#| "Like B<%p> but in lowercase: \"am\" or \"pm\" or a corresponding string "
-#| "for the current locale. (GNU)"
 msgid ""
 "Like B<%p> but in lowercase: \"am\" or \"pm\" or a corresponding string for "
 "the current locale.  (Calculated from I<tm_hour>.)  (GNU)"
-msgstr ""
-"B<%p> と同様であるが小文字が使用される。 英語の場合には \"am\" や \"pm\" とな"
-"る。(GNU)"
+msgstr "B<%p> と同様であるが小文字が使用される。 \"am\" や \"pm\"、もしくは現在のロケールでの対応する文字列となる。 I<tm_hour> から計算される。 (GNU)"
 
 #. type: TP
 #: build/C/man3/strftime.3:282 build/C/man3/strptime.3:168
@@ -6703,7 +6620,7 @@ msgid ""
 "current locale can be obtained by calling B<nl_langinfo>(3)  with "
 "B<T_FMT_AMPM> as an argument.)  (In the POSIX locale this is equivalent to B<"
 "%I:%M:%S %p>.)"
-msgstr ""
+msgstr "午前・午後形式での時刻。現在のロケールで使用される具体的なフォーマットは、引き数に B<T_FMT_AMPM> を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。 POSIX ロケールでは B<%I:%M:%S %p> と等価である。 (SU)"
 
 #. type: TP
 #: build/C/man3/strftime.3:293 build/C/man3/strptime.3:179
@@ -6730,14 +6647,10 @@ msgstr "B<%s>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:306
-#, fuzzy
-#| msgid ""
-#| "The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). "
-#| "(TZ)"
 msgid ""
 "The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). "
 "(TZ)  (Calculated from I<mktime(tm)>.)"
-msgstr "紀元 (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) からの秒数。 (TZ)"
+msgstr "紀元 (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) からの秒数。 I<mktime(tm)> から計算される。 (TZ)"
 
 #. type: TP
 #: build/C/man3/strftime.3:306 build/C/man3/strptime.3:183
@@ -6748,16 +6661,10 @@ msgstr "B<%S>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:312
-#, fuzzy
-#| msgid ""
-#| "The second as a decimal number (range 00 to 60).  (The range is up to 60 "
-#| "to allow for occasional leap seconds.)"
 msgid ""
 "The second as a decimal number (range 00 to 60).  (The range is up to 60 to "
 "allow for occasional leap seconds.)  (Calculated from I<tm_sec>.)"
-msgstr ""
-"秒 (10 進数表記) (00-60)  (時々ある閏秒に対応するため、値の範囲は 60 までと"
-"なっている)"
+msgstr "秒 (10 進数表記) (00-60)。時々ある閏秒に対応するため、値の範囲は 60 までとなっている。 I<tm_sec> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:312 build/C/man3/strptime.3:187
@@ -6790,15 +6697,10 @@ msgstr "B<%u>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:328
-#, fuzzy
-#| msgid ""
-#| "The day of the week as a decimal, range 1 to 7, Monday being 1.  See also "
-#| "B<%w>.  (SU)"
 msgid ""
 "The day of the week as a decimal, range 1 to 7, Monday being 1.  See also B<"
 "%w>.  (Calculated from I<tm_wday>.)  (SU)"
-msgstr ""
-"週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1-7)。 B<%w> も参照。(SU)"
+msgstr "週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1-7)。 B<%w> も参照。 I<tm_wday> から計算される。 (SU)"
 
 #. type: TP
 #: build/C/man3/strftime.3:328 build/C/man3/strptime.3:194
@@ -6809,18 +6711,11 @@ msgstr "B<%U>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:341
-#, fuzzy
-#| msgid ""
-#| "The week number of the current year as a decimal number, range 00 to 53, "
-#| "starting with the first Sunday as the first day of week 01.  See also B<"
-#| "%V> and B<%W>."
 msgid ""
 "The week number of the current year as a decimal number, range 00 to 53, "
 "starting with the first Sunday as the first day of week 01.  See also B<%V> "
 "and B<%W>.  (Calculated from I<tm_yday> and I<tm_wday>.)"
-msgstr ""
-"年の初めからの通算の週番号 (10 進数表記) (00-53)。 その年の最初の日曜日を、"
-"第 1 週の始まりとして計算する。 B<%V> と B<%W> も参照すること。"
+msgstr "年の初めからの通算の週番号 (10 進数表記) (00-53)。 その年の最初の日曜日を、第 1 週の始まりとして計算する。 B<%V> と B<%W> も参照すること。 I<tm_yday> と I<tm_wday> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:341 build/C/man3/strptime.3:377
@@ -6830,20 +6725,12 @@ msgstr "B<%V>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:356
-#, fuzzy
-#| msgid ""
-#| "The ISO\\ 8601 week number (see NOTES) of the current year as a decimal "
-#| "number, range 01 to 53, where week 1 is the first week that has at least "
-#| "4 days in the new year.  See also B<%U> and B<%W>.  (SU)"
 msgid ""
 "The ISO\\ 8601 week number (see NOTES) of the current year as a decimal "
 "number, range 01 to 53, where week 1 is the first week that has at least 4 "
 "days in the new year.  See also B<%U> and B<%W>.  (Calculated from "
 "I<tm_year>, I<tm_yday>, and I<tm_wday>.)  (SU)"
-msgstr ""
-"ISO\\ 8601 形式での年の始めからの週番号 (「注意」の節を参照)。 10 進数表記"
-"で、01 から 53 の値となる。週番号は、 新しい年が少なくとも 4 日以上含まれる最"
-"初の週を 1 として計算する。 B<%U> と B<%W> も参照のこと。(SU)"
+msgstr "ISO\\ 8601 形式での年の始めからの週番号 (「注意」の節を参照)。 10 進数表記で、01 から 53 の値となる。週番号は、新しい年が少なくとも 4 日以上含まれる最初の週を 1 として計算する。 B<%U> と B<%W> も参照のこと。 I<tm_year>, I<tm_yday>, I<tm_wday> から計算される。 (SU)"
 
 #. type: TP
 #: build/C/man3/strftime.3:356 build/C/man3/strptime.3:198
@@ -6854,16 +6741,10 @@ msgstr "B<%w>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:363
-#, fuzzy
-#| msgid ""
-#| "The day of the week as a decimal, range 0 to 6, Sunday being 0.  See also "
-#| "B<%u>."
 msgid ""
 "The day of the week as a decimal, range 0 to 6, Sunday being 0.  See also B<"
 "%u>.  (Calculated from I<tm_wday>.)"
-msgstr ""
-"週の何番目の日 (10 進数表記) か。日曜日を 0 とする。(0-6)。 B<%u> も参照。"
-"(SU)"
+msgstr "週の何番目の日 (10 進数表記) か。日曜日を 0 とする。(0-6)。 B<%u> も参照。 I<tm_wday> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:363 build/C/man3/strptime.3:201
@@ -6874,18 +6755,11 @@ msgstr "B<%W>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:371
-#, fuzzy
-#| msgid ""
-#| "The week number of the current year as a decimal number, range 00 to 53, "
-#| "starting with the first Sunday as the first day of week 01.  See also B<"
-#| "%V> and B<%W>."
 msgid ""
 "The week number of the current year as a decimal number, range 00 to 53, "
 "starting with the first Monday as the first day of week 01.  (Calculated "
 "from I<tm_yday> and I<tm_wday>.)"
-msgstr ""
-"年の初めからの通算の週番号 (10 進数表記) (00-53)。 その年の最初の日曜日を、"
-"第 1 週の始まりとして計算する。 B<%V> と B<%W> も参照すること。"
+msgstr "年の初めからの通算の週番号 (10 進数表記) (00-53)。 その年の最初の月曜日を、第 1 週の始まりとして計算する。 B<%V> と B<%W> も参照すること。 I<tm_yday> と I<tm_wday> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:371 build/C/man3/strptime.3:205
@@ -6902,7 +6776,7 @@ msgid ""
 "B<nl_langinfo>(3)  with B<D_FMT> as an argument for the B<%x> conversion "
 "specification, and with B<ERA_D_FMT> for the B<%Ex> conversion "
 "specification.)  (In the POSIX locale this is equivalent to B<%m/%d/%y>.)"
-msgstr ""
+msgstr "現在のロケールで一般的な日付表記。時刻は含まない。現在のロケールで使用される具体的なフォーマットは、 B<%x> 変換指定の場合は B<D_FMT> を、 B<%Ex> 変換指定の場合は B<ERA_D_FMT> を引き数に指定して、 B<nl_langinfo>(3) を呼び出すことで取得できる。 POSIX ロケールでは、これは B<%m/%d/%y> と等価である。"
 
 #. type: TP
 #: build/C/man3/strftime.3:387 build/C/man3/strptime.3:208
@@ -6919,7 +6793,7 @@ msgid ""
 "B<nl_langinfo>(3)  with B<T_FMT> as an argument for the B<%X> conversion "
 "specification, and with B<ERA_T_FMT> for the B<%EX> conversion "
 "specification.)  (In the POSIX locale this is equivalent to B<%H:%M:%S>.)"
-msgstr ""
+msgstr "現在のロケールで一般的な時刻表記。日付は含まない。現在のロケールで使用される具体的なフォーマットは、 B<%X> 変換指定の場合は B<T_FMT> を、 B<%EX> 変換指定の場合は B<ERA_T_FMT> を引き数に指定して、 B<nl_langinfo>(3) を呼び出すことで取得できる。 POSIX ロケールでは、これは B<%H:%M:%S> と等価である。"
 
 #. type: TP
 #: build/C/man3/strftime.3:403 build/C/man3/strptime.3:211
@@ -6934,7 +6808,7 @@ msgid ""
 "%Ey> conversion specification corresponds to the year since the beginning of "
 "the era denoted by the B<%EC> conversion specification.)  (Calculated from "
 "I<tm_year>)"
-msgstr ""
+msgstr "西暦の下 2 桁 (世紀部分を含まない年) (00 から 99)。 B<%Ey> 変換指定は。 B<%EC> 変換指定で示される西暦以外の年数表記 (\"era\") における初めからの年数に対応する。 I<tm_year> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:414 build/C/man3/strptime.3:217
@@ -6948,7 +6822,7 @@ msgid ""
 "The year as a decimal number including the century.  (The B<%EY> conversion "
 "specification corresponds to the full alternative year representation.)  "
 "(Calculated from I<tm_year>)"
-msgstr ""
+msgstr "世紀部分を含めた 10 進表記の西暦年。 B<%EY> 変換指定は別形式の年表記の完全な表現に対応する。 I<tm_year> から計算される。"
 
 #. type: TP
 #: build/C/man3/strftime.3:422 build/C/man3/strptime.3:384
@@ -6981,7 +6855,7 @@ msgstr "B<%+>"
 #: build/C/man3/strftime.3:440
 msgid ""
 "The date and time in B<date>(1)  format. (TZ)  (Not supported in glibc2.)"
-msgstr "B<date>(1)  形式での日時。(TZ)  (glibc2 ではサポートされていない)"
+msgstr "B<date>(1) 形式での日時。 glibc2 ではサポートされていない。 (TZ)"
 
 #. type: TP
 #: build/C/man3/strftime.3:440 build/C/man3/strptime.3:114
@@ -6992,23 +6866,10 @@ msgstr "B<%%>"
 #. type: Plain text
 #: build/C/man3/strftime.3:443
 msgid "A literal \\(aq%\\(aq character."
-msgstr "\\(aq%\\(aq 文字"
+msgstr "\\(aq%\\(aq 文字"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:489
-#, fuzzy
-#| msgid ""
-#| "Some conversion specifications can be modified by preceding the "
-#| "conversion specifier character by the B<E> or B<O> I<modifier> to "
-#| "indicate that an alternative format should be used.  If the alternative "
-#| "format or specification does not exist for the current locale, the "
-#| "behavior will be as if the unmodified conversion specification were used. "
-#| "(SU)  The Single UNIX Specification mentions B<%Ec>, B<%EC>, B<%Ex>, B<"
-#| "%EX>, B<%Ey>, B<%EY>, B<%Od>, B<%Oe>, B<%OH>, B<%OI>, B<%Om>, B<%OM>, B<"
-#| "%OS>, B<%Ou>, B<%OU>, B<%OV>, B<%Ow>, B<%OW>, B<%Oy>, where the effect of "
-#| "the B<O> modifier is to use alternative numeric symbols (say, roman "
-#| "numerals), and that of the E modifier is to use a locale-dependent "
-#| "alternative representation."
 msgid ""
 "Some conversion specifications can be modified by preceding the conversion "
 "specifier character by the B<E> or B<O> I<modifier> to indicate that an "
@@ -7024,17 +6885,7 @@ msgid ""
 "supplying B<ERA> as an argument to a B<nl_langinfo>(3).  One example of such "
 "alternative forms is the Japanese era calendar scheme in the B<ja_JP> glibc "
 "locale."
-msgstr ""
-"いくつかの変換指定では、変換指定文字の前に B<E> や B<O> 「修飾子」を置くこと"
-"によって別書式を使用するように指定することができる。 現在のロケールにおいて別"
-"書式が存在しない場合には、 通常の変換指定が使用されたかのように動作する "
-"(SU)。 統一 UNIX 規格 (Single UNIX Specification) では B<%Ec>, B<%EC>, B<"
-"%Ex>, B<%EX>, B<%Ey>, B<%EY>, B<%Od>, B<%Oe>, B<%OH>, B<%OI>, B<%Om>, B<"
-"%OM>, B<%OS>, B<%Ou>, B<%OU>, B<%OV>, B<%Ow>, B<%OW>, B<%Oy>, について記述が"
-"ある。ここで B<O> 修飾子は別形式の数値 (ローマ数字とか) を指定するために使用"
-"する。 B<E> 修飾子はロケール依存の別表現を指定するのに使用する。 (訳注: B<E> "
-"修飾子は日本で使用されている「昭和」「平成」 などの元号による年表記を指定す"
-"る。glibc 2.2 以降でのみ有効)"
+msgstr "いくつかの変換指定では、変換指定文字の前に B<E> や B<O> 「修飾子」を置くことによって別書式を使用するように指定することができる。 現在のロケールにおいて別書式が存在しない場合には、 通常の変換指定が使用されたかのように動作する (SU)。 統一 UNIX 規格 (Single UNIX Specification) では B<%Ec>, B<%EC>, B<%Ex>, B<%EX>, B<%Ey>, B<%EY>, B<%Od>, B<%Oe>, B<%OH>, B<%OI>, B<%Om>, B<%OM>, B<%OS>, B<%Ou>, B<%OU>, B<%OV>, B<%Ow>, B<%OW>, B<%Oy>, について記述がある。ここで B<O> 修飾子は別形式の数値シンボル (ローマ数字とか) を指定するために使用する。 B<E> 修飾子はロケール依存の別表現を指定するのに使用する。 B<E> 修飾子を使った場合のデータ表現に適用されるルールは、 B<nl_langinfo>(3) の引き数に B<ERA> を指定することで取得できる。このような別表現の例としては B<ja_JP> glibc ロケールでの日本の年号 (「昭和」「平成」など) によるカレンダー表記がある。"
 
 #.  (This behavior applies since at least libc 4.4.4;
 #.  very old versions of libc, such as libc 4.4.1,
@@ -7063,10 +6914,7 @@ msgid ""
 "Note that the return value 0 does not necessarily indicate an error.  For "
 "example, in many locales B<%p> yields an empty string.  An empty I<format> "
 "string will likewise yield an empty string."
-msgstr ""
-"返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。 例えば、"
-"多くのロケールでは B<%p> は空文字列を返す。 同様に、空の I<format> 文字列は空"
-"文字列を返す。"
+msgstr "返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。例えば、多くのロケールでは B<%p> は空文字列を返す。同様に、空の I<format> 文字列は空文字列を返す。"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:523
@@ -7080,7 +6928,7 @@ msgstr ""
 #: build/C/man3/strftime.3:533
 #, no-wrap
 msgid "B<strftime>()"
-msgstr " B<strftime>()"
+msgstr "B<strftime>()"
 
 #.  FIXME strftime() is in POSIX.1-2001 and POSIX.1-2008, but the details
 #.  in the standards changed across versions. Investigate and
@@ -7096,13 +6944,7 @@ msgid ""
 "to ANSI C; POSIX.2 describes under B<date>(1)  several extensions that could "
 "apply to B<strftime>()  as well.  The B<%F> conversion is in C99 and "
 "POSIX.1-2001."
-msgstr ""
-"SVr4, C89, C99.  個々の変換が厳密にどの規格に含まれるかは、 ANSI C (印なし)、"
-"統一 UNIX 規格 (SU印)、Olson の timezone パッケージ (TZ印)、 glibc 独自 (GNU"
-"印) で示している。glibc2 では B<%+> はサポートされていないが、 いくつかの拡張"
-"が行われている。POSIX.1 では ANSI C のみを参照している。 POSIX.2 の "
-"B<date>(1)  のところに記述されている幾つかの拡張は B<strftime>()  にも適用で"
-"きるだろう。 B<%F> 変換は C99 と POSIX.1-2001 にある。"
+msgstr "SVr4, C89, C99. 個々の変換が厳密にどの規格に含まれるかをマークで示している。「マークなし」は ANSI C、「SU」は統一 UNIX 規格を、「TZ」は Olson の timezone パッケージ、「GNU」は glibc を示す。 glibc2 では B<%+> はサポートされていないが、 いくつかの拡張が行われている。POSIX.1 では ANSI C のみを参照している。 POSIX.2 の B<date>(1)  のところに記述されている幾つかの拡張は B<strftime>() にも適用できるだろう。 B<%F> 変換は C99 と POSIX.1-2001 にある。"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:562
@@ -7110,34 +6952,16 @@ msgid ""
 "In SUSv2, the B<%S> specifier allowed a range of 00 to 61, to allow for the "
 "theoretical possibility of a minute that included a double leap second "
 "(there never has been such a minute)."
-msgstr ""
-"SUSv2 では、 B<%S> は 00 から 61 の範囲をとると規定されている。 これは、1分間"
-"のうち閏秒が 2つ入る可能性が理論的にはあることを 考慮してのものである (実際に"
-"は、このような状況はこれまで一度も 起こっていない)。"
+msgstr "SUSv2 では、 B<%S> は 00 から 61 の範囲をとると規定されている。 これは、1 分間のうち閏秒が 2 つ入る可能性が理論的にはあることを考慮してのものである (実際には、このような状況はこれまで一度も 起こっていない)。"
 
 #. type: SS
 #: build/C/man3/strftime.3:563
 #, no-wrap
 msgid "ISO 8601 week dates"
-msgstr "ISO\\ 8601 の週・曜日表記 (Week Dates)"
+msgstr "ISO\\ 8601 の暦週日付"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:590
-#, fuzzy
-#| msgid ""
-#| "B<%G>, B<%g>, and B<%V> 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 (B<%V>)  of the year 2009 (B<%G>); week 01 of ISO\\ 8601 "
-#| "year 2010 starts on Monday, 4 January 2010."
 msgid ""
 "B<%G>, B<%g>, and B<%V> yield values calculated from the week-based year "
 "defined by the ISO\\ 8601 standard.  In this system, weeks start on a "
@@ -7153,18 +6977,7 @@ msgid ""
 "of the year 2009 (B<%G>); week 01 of ISO\\ 8601 year 2010 starts on Monday, "
 "4 January 2010.  Similarly, the first two days of January 2011 are "
 "considered to be part of week 52 of the year 2010."
-msgstr ""
-"B<%G>, B<%g>, B<%V> は、ISO\\ 8601 標準により定義された週単位表記の年により "
-"計算される値を出力する。 ISO\\ 8601 標準の週単位表記では、週は月曜日から開始"
-"され、 週番号は、年の最初の週が 01 となり、最後の週は 52 か 53 となる。 週 "
-"01 は、新しい年が 4 日以上含まれる最初の週である。 言い換えると、週 01 は、そ"
-"の年の木曜日を含む最初の週、 つまり 1 月 4 日を含む週ということである。 新し"
-"い年のカレンダー上の最初の週に新しい年が 3 日以下しか含まれない場合、 ISO\\ "
-"8601 の週単位表記では、これらの日を前の年の週 53 の一部とみなす。 例えば、"
-"2010 年 1 月 1 日は金曜日であり、 その週には 2010 年の日が 3 日しか含まれな"
-"い。 したがって、ISO\\ 8601 の週単位表記では、これらの日は 2009 年 (B<%G>)  "
-"の週 53 (B<%V>) の一部となる。 ISO\\ 8601 の 2010 年の週 01 は 2010 年 1 月 "
-"4 日の月曜日から始まる。"
+msgstr "B<%G>, B<%g>, B<%V> は、ISO\\ 8601 標準により定義された週単位表記の年により 計算される値を出力する。 ISO\\ 8601 標準の週単位表記では、週は月曜日から開始され、 週番号は、年の最初の週が 01 となり、最後の週は 52 か 53 となる。 週 01 は、新しい年が 4 日以上含まれる最初の週である。 言い換えると、週 01 は、その年の木曜日を含む最初の週、 つまり 1 月 4 日を含む週ということである。 新しい年のカレンダー上の最初の週に新しい年が 3 日以下しか含まれない場合、 ISO\\ 8601 の週単位表記では、これらの日を前の年の週 53 の一部とみなす。 例えば、2010 年 1 月 1 日は金曜日であり、 その週には 2010 年の日が 3 日しか含まれない。 したがって、ISO\\ 8601 の週単位表記では、これらの日は 2009 年 (B<%G>)  の週 53 (B<%V>) の一部となる。 ISO\\ 8601 の 2010 年の週 01 は 2010 年 1 月 4 日の月曜日から始まる。同様に、 2011 年 1 月の最初の 2 日は 2010 年の週 52 の一部とみなされる。"
 
 #.  HP-UX and Tru64 also have features like this.
 #. type: Plain text
@@ -7175,17 +6988,12 @@ msgid ""
 "provide similar features.)  Between the \\(aq%\\(aq character and the "
 "conversion specifier character, an optional I<flag> and field I<width> may "
 "be specified.  (These precede the B<E> or B<O> modifiers, if present.)"
-msgstr ""
-"glibc では変換指定にいくつか拡張を行っている (これらの拡張は POSIX.1-2001 に"
-"は規定されていないが、 他のいくつかのシステムで同様の機能が提供されている)。 "
-"\\(aq%\\(aq 文字と変換指定文字の間に、オプションとして I<flag> とフィールド"
-"の I<幅> を指定できる (これらを指定する場合には B<E> や B<O> 修飾子の前に置"
-"く)。"
+msgstr "glibc では変換指定にいくつか拡張を行っている (これらの拡張は POSIX.1-2001 には規定されていないが、 他のいくつかのシステムで同様の機能が提供されている)。 \\(aq%\\(aq 文字と変換指定文字の間に、オプションとして I<フラグ> とフィールドの I<幅> を指定できる (これらを指定する場合には B<E> や B<O> 修飾子の前に置く)。"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:608
 msgid "The following flag characters are permitted:"
-msgstr "以下のフラグ文字が使用できる:"
+msgstr "以下のフラグ文字が使用できる"
 
 #. type: TP
 #: build/C/man3/strftime.3:608
@@ -7229,7 +7037,7 @@ msgstr ""
 #: build/C/man3/strftime.3:620
 #, no-wrap
 msgid "B<\\(ha>"
-msgstr ""
+msgstr "B<\\(ha>"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:623
@@ -7258,10 +7066,7 @@ msgid ""
 "An optional decimal width specifier may follow the (possibly absent) flag.  "
 "If the natural size of the field is smaller than this width, then the result "
 "string is padded (on the left) to the specified width."
-msgstr ""
-"オプションの10進数の幅指定子はフラグの後ろに置くことができる (フラグはなくて"
-"もよい)。フィールドの本来の大きさが指定された幅よりも 小さい場合、結果文字列"
-"の左側は指定された幅までパディングされる。"
+msgstr "オプションの 10 進数の幅指定子はフラグの後ろに置くことができる (フラグはなくてもよい)。フィールドの本来の大きさが指定された幅よりも 小さい場合、結果文字列の左側は指定された幅までパディングされる。"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:651
@@ -7270,11 +7075,7 @@ msgid ""
 "This makes it impossible to distinguish this error case from cases where the "
 "I<format> string legitimately produces a zero-length output string.  "
 "POSIX.1-2001 does I<not> specify any I<errno> settings for B<strftime>()."
-msgstr ""
-"出力文字列が I<max> バイトを超えてしまう場合、 I<errno> は設定「されない」。 "
-"このため、このエラーを、 I<format> 文字列がきちんと処理されて長さ 0 の出力文"
-"字列が生成される場合を区別することができない。 POSIX.1-2001 では "
-"B<strftime>() で I<errno> に設定する値について一切規定して「いない」。"
+msgstr "出力文字列が I<max> バイトを超えてしまう場合、 I<errno> は設定「されない」。 このため、このエラーと、 I<format> 文字列がきちんと処理されて長さ 0 の出力文字列が生成される場合、を区別することができない。 POSIX.1-2001 では B<strftime>() に関して I<errno> に設定される値について一切規定して「いない」。"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:666
@@ -7285,7 +7086,7 @@ msgid ""
 "date and time representation.  One meets all kinds of strange obfuscations "
 "to circumvent this B<gcc>(1)  problem.  A relatively clean one is to add an "
 "intermediate function"
-msgstr "B<gcc>(1)  のいくつかのバージョンにはおかしなところがあり、 B<%c> の使用法について以下のような警告を出す: I<warning: `%c\\(aq yields only last 2 digits of year in some locales> (I<警告:> いくつかのロケールでは I<`%c\\(aq> は年の下2桁しか出力しないI<)。> もちろんプログラマが B<%c> を使うのはお薦めできることである。 B<%c> を使うと適切な日付と時刻の表記を得ることができるからである。 B<gcc>(1)  のこの問題を回避しようとすると、何かすっきりしない気分になるだろう。 比較的きれいな解決方法は以下のような中間関数を追加することである。"
+msgstr "B<gcc>(1)  のいくつかのバージョンにはおかしなところがあり、 B<%c> の使用法について以下のような警告を出す: I<warning: `%c\\(aq yields only last 2 digits of year in some locales> (I<警告:> いくつかのロケールでは I<`%c\\(aq> は年の下2桁しか出力しないI<)。> もちろんプログラマが B<%c> を使うのはお薦めできることである。 B<%c> を使うと適切な日付と時刻の表記を得ることができるからである。 B<gcc>(1)  のこの問題を回避しようとすると、何かすっきりしない気分になるだろう。 比較的きれいな回避策は以下のような中間関数を追加することである。"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:675
@@ -7347,14 +7148,14 @@ msgstr "サンプルプログラム"
 #. type: Plain text
 #: build/C/man3/strftime.3:705
 msgid "The program below can be used to experiment with B<strftime>()."
-msgstr "以下のプログラムを使うと B<strftime>()  の実験ができる。"
+msgstr "以下のプログラムを使うと B<strftime>() の実験ができる。"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:709
 msgid ""
 "Some examples of the result string produced by the glibc implementation of "
 "B<strftime>()  are as follows:"
-msgstr "以下に、 B<strftime>()  の glibc 実装が生成する結果の例をいくつか示す:"
+msgstr "以下に B<strftime>() の glibc 実装が生成する結果の例をいくつか示す。"
 
 #. type: Plain text
 #: build/C/man3/strftime.3:718
@@ -13474,49 +13275,12 @@ msgstr " B<adjtimex>(2), B<ntp_adjtime>(3), B<time>(7)"
 #~ msgid "B<DST_AUSTALT>  /* Australian style with shift in 1986 */\n"
 #~ msgstr "B<DST_AUSTALT>  /* 1986年に移行されたオーストラリア式 */\n"
 
-#~ msgid ""
-#~ "The abbreviated name of the day of the week according to the current "
-#~ "locale."
-#~ msgstr "現在のロケールにおける曜日の省略名。"
-
-#~ msgid ""
-#~ "The full name of the day of the week according to the current locale."
-#~ msgstr "現在のロケールにおける曜日の完全な名前。"
-
 #~ msgid "The abbreviated month name according to the current locale."
 #~ msgstr "現在のロケールにおける月の省略名。"
 
 #~ msgid "The full month name according to the current locale."
 #~ msgstr "現在のロケールにおける月の完全な名前。"
 
-#~ msgid "The preferred date and time representation for the current locale."
-#~ msgstr "現在のロケールにおいて一般的な日付・時刻の表記。"
-
-#~ msgid "The century number (year/100) as a 2-digit integer. (SU)"
-#~ msgstr "世紀 (西暦年の上 2 桁)。 (SU)"
-
-#~ msgid ""
-#~ "The time in a.m. or p.m. notation.  In the POSIX locale this is "
-#~ "equivalent to B<%I:%M:%S %p>.  (SU)"
-#~ msgstr ""
-#~ "午前・午後形式での時刻。 POSIX ロケールでは B<%I:%M:%S %p> と等価である。"
-#~ "(SU)"
-
-#~ msgid ""
-#~ "The week number of the current year as a decimal number, range 00 to 53, "
-#~ "starting with the first Monday as the first day of week 01."
-#~ msgstr ""
-#~ "年の初めからの通算の週番号 (10 進数表記) (00-53)。 その年の最初の月曜日"
-#~ "を、第 1 週の始まりとして計算する。"
-
-#~ msgid ""
-#~ "The preferred date representation for the current locale without the time."
-#~ msgstr "現在のロケールで一般的な日付表記。時刻は含まない。"
-
-#~ msgid ""
-#~ "The preferred time representation for the current locale without the date."
-#~ msgstr "現在のロケールで一般的な時刻表記。日付は含まない。"
-
 #~ msgid "The year as a decimal number without a century (range 00 to 99)."
 #~ msgstr "西暦の下2桁 (世紀部分を含まない年) (00-99)。"
 
index 401289d..af447a2 100644 (file)
 .\" Updated 2012-05-29, Akihiro MOTOKI <amotoki@gmail.com>
 .\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
 .\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2021-04-13, Akihiro Motoki <amotoki@gmail.com>
 .\"
-.TH STRFTIME 3 2014\-08\-19 GNU "Linux Programmer's Manual"
+.TH STRFTIME 3 " 2020\-08\-13" GNU "Linux Programmer's Manual"
 .SH 名前
 strftime \- 日付および時刻の文字列への変換
 .SH 書式
 .nf
 \fB#include <time.h>\fP
-.sp
+.PP
 \fBsize_t strftime(char *\fP\fIs\fP\fB, size_t \fP\fImax\fP\fB, const char *\fP\fIformat\fP\fB,\fP
 \fB                const struct tm *\fP\fItm\fP\fB);\fP
 .fi
 .SH 説明
 .\" FIXME . POSIX says: Local timezone information is used as though
 .\" strftime() called tzset().  But this doesn't appear to be the case
-\fBstrftime\fP()  関数 は、要素別の時刻 \fItm\fP の内容を \fIformat\fP で指定された書式指定にしたがって変換し、 長さ
-\fImax\fP の文字列 \fIs\fP に書き込む。
+\fBstrftime\fP() 関数 は、要素別の時刻 \fItm\fP の内容を \fIformat\fP で指定された書式指定にしたがって変換し、長さ \fImax\fP
+の文字列 \fIs\fP に書き込む。要素別の時刻構造体 \fItm\fP は \fI<time.h>\fP で定義されている。 \fBctime\fP(3)
+も参照。
 .PP
-書式指定はヌル終端された文字列であり、 「変換指定 (conversion specification)」と呼ばれる特別な文字列を 含まることができる。
-各々の変換指定は \(aq%\(aq 文字で始まり、 「変換指定文字 (conversion specifier character)」と呼ばれる
-何らか他の文字で終端される。上記以外の全ての文字列は 「通常の文字列 (ordinary character sequence)」となる。
+書式指定はヌル終端された文字列であり、「変換指定 (conversion
+specification)」と呼ばれる特別な文字列を含めることができる。各々の変換指定は \(aq%\(aq 文字で始まり、「変換指定文字
+(conversion specifier character)」と呼ばれる何らか他の文字で終端される。上記以外の全ての文字列は「通常の文字列
+(ordinary character sequence)」となる。
 .PP
-(NULL バイトも含む) 通常の文字列内の文字は、 そのまま \fIformat\fP から \fIs\fP にコピーされる。
-一方、変換指定の文字は以下のように置換される。
+(NULL バイトも含む) 通常の文字列内の文字は、そのまま \fIformat\fP から \fIs\fP
+にコピーされる。一方、変換指定の文字は以下のリストに示すように置換される。このリストでは、 \fItm\fP
+構造体のフィールドが参照される場合、その情報も記載している。
 .TP 
 \fB%a\fP
-現在のロケールにおける曜日の省略名。
+現在のロケールにおける曜日の省略名。 \fItm_wday\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
+\fBABDAY_\fP{\fB1\fP\(en\fB7\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
 .TP 
 \fB%A\fP
-現在のロケールにおける曜日の完全な名前。
+現在のロケールにおける曜日の完全な名前。 \fItm_wday\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
+\fBDAY_\fP{\fB1\fP\(en\fB7\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
 .TP 
 \fB%b\fP
-現在のロケールにおける月の省略名。
+現在のロケールにおける月の省略名。 \fItm_mon\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
+\fBABMON_\fP{\fB1\fP\(en\fB12\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
 .TP 
 \fB%B\fP
-現在のロケールにおける月の完全な名前。
+現在のロケールにおける月の完全な名前。 \fItm_mon\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
+\fBMON_\fP{\fB1\fP\(en\fB12\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
 .TP 
 \fB%c\fP
-現在のロケールにおいて一般的な日付・時刻の表記。
+現在のロケールにおいて一般的な日付・時刻の表記。現在のロケールで使用される具体的なフォーマットは、 \fB%c\fP 変換指定の場合は \fBD_T_FMT\fP
+を、 \fB%Ec\fP 変換指定の場合は \fBERA_D_T_FMT\fP を引き数に指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
+POSIX ロケールでは \fB%a %b %e %H:%M:%S %Y\fP と等価である。
 .TP 
 \fB%C\fP
-世紀 (西暦年の上 2 桁)。 (SU)
+世紀に対応する 2 桁の整数 (year/1000)。 \fB%EC\fP 変換指定は、西暦以外の年数表記 ("era") の名前に対応する。
+\fItm_year\fP から計算される。 (SU)
 .TP 
 \fB%d\fP
-月内通算日 (10 進数表記) (01\-31)。
+月内通算日 (10 進数表記) (01\-31)。 \fItm_mday\fP から計算される。
 .TP 
 \fB%D\fP
 \fB%m/%d/%y\fP と等価。(うえっ、アメリカ専用だ。アメリカ以外の国では \fB%d/%m/%y\fP
 の方が一般的だ。紛らわしいので、使用すべきではない。) (SU)
 .TP 
 \fB%e\fP
-\fB%d\fP と同様に月内通算日を 10 進数で表現するが、 1 桁の場合 10 の位にゼロを置かずスペースを置く。(SU)
+\fB%d\fP と同様に月内通算日を 10 進数で表現するが、 1 桁の場合 10 の位にゼロを置かずスペースを置く。 \fItm_mday\fP
+から計算される。 (SU)
 .TP 
 \fB%E\fP
-別形式を使用する際の修飾子。下記参照。 (SU)
+別形式 (西暦以外の年数表記; "era") を使用する際の修飾子。下記参照。 (SU)
 .TP 
 \fB%F\fP
 \fB%Y\-%m\-%d\fP と等価 (ISO\ 8601 形式の日付フォーマット)。 (C99)
 .TP 
 \fB%G\fP
-ISO\ 8601 週単位表記の年 (week\-based year; 「注意」の節を参照)。 世紀も 10 進数で表す。 ISO 週番号 (\fB%V\fP
-を参照) に対応した 4 桁の西暦年。 これは基本的には \fB%Y\fP と同じ形式だが、ISO 週数が前年や翌年になる
-場合にはその年が使用される点が異なる。(TZ)
+ISO\ 8601 の週 (ISO\ 8601 week) に基づく年の表示。「注意」の節を参照)。世紀も 10 進数で表す。 ISO 週番号
+(\fB%V\fP を参照) に対応した 4 桁の西暦年。 これは基本的には \fB%Y\fP と同じ形式だが、ISO
+週数が前年や翌年になる場合にはその年が使用される点が異なる。 \fItm_year\fP, \fItm_yday\fP, \fItm_wday\fP から計算される。
+(TZ)
 .TP 
 \fB%g\fP
-\fB%G\fP と同様。但し、世紀を含まず下 2 桁のみを表示 (00\-99)。 (TZ)
+\fB%G\fP と同様。ただし、世紀を含まず下 2 桁のみを表示 (00\(en99)。 \fItm_year\fP, \fItm_yday\fP,
+\fItm_wday\fP から計算される。 (TZ)
 .TP 
 \fB%h\fP
 \fB%b\fP と等価 (SU)
 .TP 
 \fB%H\fP
-24 時間表記での時 (hour)。 (00\-23)
+24 時間表記での時 (hour) (00\-23)。 \fItm_hour\fP から計算される。
 .TP 
 \fB%I\fP
-12 時間表記での時 (hour)。 (01\-12)
+12 時間表記での時 (hour) (01\-12)。 \fItm_hour\fP から計算される。
 .TP 
 \fB%j\fP
-年の初めから通算の日数。 (001\-366)
+年の初めから通算の日数 (001\-366)。 \fItm_yday\fP から計算される。
 .TP 
 \fB%k\fP
-24 時間表記での時 (0\-23)。 1 桁の場合には前にゼロでなくスペースが置かれる。 (\fB%H\fP も参照) (TZ)
+24 時間表記での時 (0\-23)。 1 桁の場合には前にゼロでなくスペースが置かれる。 \fB%H\fP も参照。 \fItm_hour\fP から計算される。
+(TZ)
 .TP 
 \fB%l\fP
-12 時間表記での時 (0\-12)。 1 桁の場合には前にゼロでなくスペースが置かれる。 (\fB%I\fP も参照) (TZ)
+12 時間表記での時 (0\-12)。 1 桁の場合には前にゼロでなくスペースが置かれる。 \fB%I\fP も参照。 \fItm_hour\fP から計算される。
+(TZ)
 .TP 
 \fB%m\fP
-月 (10 進数表記)。 (01\-12)
+10 進数表記の月 (01\-12)。 \fItm_mon\fP から計算される。
 .TP 
 \fB%M\fP
-分 (10 進数表記) (00\-59)
+10 進数表記の分 (00\-59)。 \fItm_min\fP から計算される。
 .TP 
 \fB%n\fP
-改行 (SU)
+改行 (SU)
 .TP 
 \fB%O\fP
-別形式を使用する際の修飾子。下記参照。 (SU)
+別の数値シンボルを使用する際の修飾子。下記参照。 (SU)
 .TP 
 \fB%p\fP
 現在のロケールにおける「午前」「午後」に相当する文字列。 英語の場合には "AM" または "PM" となる。
-正午は「午後」、真夜中は「午前」として扱われる。
+正午は「午後」、真夜中は「午前」として扱われる。 \fItm_hour\fP から計算される。現在のロケールで "AM" と "PM"
+に対応する文字列表現は、それぞれ \fBAM_STR\fP と \fBPM_STR\fP を指定して \fBnl_langinfo\fP(3)
+を呼び出すことで取得できる。
 .TP 
 \fB%P\fP
-\fB%p\fP と同様であるが小文字が使用される。 英語の場合には "am" や "pm" となる。(GNU)
+\fB%p\fP と同様であるが小文字が使用される。 "am" や "pm"、もしくは現在のロケールでの対応する文字列となる。 \fItm_hour\fP
+から計算される。 (GNU)
 .TP 
 \fB%r\fP
-午前・午後形式での時刻。 POSIX ロケールでは \fB%I:%M:%S %p\fP と等価である。(SU)
+午前・午後形式での時刻。現在のロケールで使用される具体的なフォーマットは、引き数に \fBT_FMT_AMPM\fP を指定して
+\fBnl_langinfo\fP(3) を呼び出すことで取得できる。 POSIX ロケールでは \fB%I:%M:%S %p\fP と等価である。 (SU)
 .TP 
 \fB%R\fP
 24 時間表記での時刻、秒は表示しない (\fB%H:%M\fP)。 秒を含んだものは以下の \fB%T\fP を参照すること。(SU)
 .TP 
 \fB%s\fP
-紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数。 (TZ)
+紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数。 \fImktime(tm)\fP から計算される。
+(TZ)
 .TP 
 \fB%S\fP
-秒 (10 進数表記) (00\-60)  (時々ある閏秒に対応するため、値の範囲は 60 までとなっている)
+秒 (10 進数表記) (00\-60)。時々ある閏秒に対応するため、値の範囲は 60 までとなっている。 \fItm_sec\fP から計算される。
 .TP 
 \fB%t\fP
 タブ文字 (SU)
@@ -174,33 +195,40 @@ ISO\ 8601 週単位表記の年 (week\-based year; 「注意」の節を参照)
 24 時間表記の時間 (\fB%H:%M:%S\fP) (SU)
 .TP 
 \fB%u\fP
-週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1\-7)。 \fB%w\fP も参照。(SU)
+週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1\-7)。 \fB%w\fP も参照。 \fItm_wday\fP から計算される。 (SU)
 .TP 
 \fB%U\fP
 年の初めからの通算の週番号 (10 進数表記) (00\-53)。 その年の最初の日曜日を、第 1 週の始まりとして計算する。 \fB%V\fP と \fB%W\fP
-も参照すること。
+も参照すること。 \fItm_yday\fP と \fItm_wday\fP から計算される。
 .TP 
 \fB%V\fP
-ISO\ 8601 形式での年の始めからの週番号 (「注意」の節を参照)。 10 進数表記で、01 から 53 の値となる。週番号は、
-新しい年が少なくとも 4 日以上含まれる最初の週を 1 として計算する。 \fB%U\fP と \fB%W\fP も参照のこと。(SU)
+ISO\ 8601 形式での年の始めからの週番号 (「注意」の節を参照)。 10 進数表記で、01 から 53
+の値となる。週番号は、新しい年が少なくとも 4 日以上含まれる最初の週を 1 として計算する。 \fB%U\fP と \fB%W\fP も参照のこと。
+\fItm_year\fP, \fItm_yday\fP, \fItm_wday\fP から計算される。 (SU)
 .TP 
 \fB%w\fP
-週の何番目の日 (10 進数表記) か。日曜日を 0 とする。(0\-6)。 \fB%u\fP も参照。(SU)
+週の何番目の日 (10 進数表記) か。日曜日を 0 とする。(0\-6)。 \fB%u\fP も参照。 \fItm_wday\fP から計算される。
 .TP 
 \fB%W\fP
-年の初めからの通算の週番号 (10 進数表記) (00\-53)。 その年の最初の月曜日を、第 1 週の始まりとして計算する。
+年の初めからの通算の週番号 (10 進数表記) (00\-53)。 その年の最初の月曜日を、第 1 週の始まりとして計算する。 \fB%V\fP と \fB%W\fP
+も参照すること。 \fItm_yday\fP と \fItm_wday\fP から計算される。
 .TP 
 \fB%x\fP
-現在のロケールで一般的な日付表記。時刻は含まない。
+現在のロケールで一般的な日付表記。時刻は含まない。現在のロケールで使用される具体的なフォーマットは、 \fB%x\fP 変換指定の場合は \fBD_FMT\fP
+を、 \fB%Ex\fP 変換指定の場合は \fBERA_D_FMT\fP を引き数に指定して、 \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
+POSIX ロケールでは、これは \fB%m/%d/%y\fP と等価である。
 .TP 
 \fB%X\fP
-現在のロケールで一般的な時刻表記。日付は含まない。
+現在のロケールで一般的な時刻表記。日付は含まない。現在のロケールで使用される具体的なフォーマットは、 \fB%X\fP 変換指定の場合は \fBT_FMT\fP
+を、 \fB%EX\fP 変換指定の場合は \fBERA_T_FMT\fP を引き数に指定して、 \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
+POSIX ロケールでは、これは \fB%H:%M:%S\fP と等価である。
 .TP 
 \fB%y\fP
-西暦の下2桁 (世紀部分を含まない年) (00\-99)。
+西暦の下 2 桁 (世紀部分を含まない年) (00 から 99)。 \fB%Ey\fP 変換指定は。 \fB%EC\fP 変換指定で示される西暦以外の年数表記
+("era") における初めからの年数に対応する。 \fItm_year\fP から計算される。
 .TP 
 \fB%Y\fP
-世紀部分を含めた ( 4 桁の) 西暦年
+世紀部分を含めた 10 進表記の西暦年。 \fB%EY\fP 変換指定は別形式の年表記の完全な表現に対応する。 \fItm_year\fP から計算される
 .TP 
 \fB%z\fP
 \fI+hhmm\fP や \fI\-hhmm\fP の形式のタイムゾーン (UTC へのオフセット時間)。(SU)
@@ -211,20 +239,20 @@ ISO\ 8601 形式での年の始めからの週番号 (「注意」の節を参
 \fB%+\fP
 .\" Nov 05 -- Not in Linux/glibc, but is in some BSDs (according to
 .\" their man pages)
-\fBdate\fP(1)  形式での日時。(TZ)  (glibc2 ではサポートされていない)
+\fBdate\fP(1) 形式での日時。 glibc2 ではサポートされていない。 (TZ)
 .TP 
 \fB%%\fP
-\(aq%\(aq 文字
+\(aq%\(aq 文字
 .PP
 いくつかの変換指定では、変換指定文字の前に \fBE\fP や \fBO\fP 「修飾子」を置くことによって別書式を使用するように指定することができる。
 現在のロケールにおいて別書式が存在しない場合には、 通常の変換指定が使用されたかのように動作する (SU)。 統一 UNIX 規格 (Single
 UNIX Specification) では \fB%Ec\fP, \fB%EC\fP, \fB%Ex\fP, \fB%EX\fP, \fB%Ey\fP, \fB%EY\fP,
 \fB%Od\fP, \fB%Oe\fP, \fB%OH\fP, \fB%OI\fP, \fB%Om\fP, \fB%OM\fP, \fB%OS\fP, \fB%Ou\fP, \fB%OU\fP,
-\fB%OV\fP, \fB%Ow\fP, \fB%OW\fP, \fB%Oy\fP, について記述がある。ここで \fBO\fP 修飾子は別形式の数値 (ローマ数字とか)
-を指定するために使用する。 \fBE\fP 修飾子はロケール依存の別表現を指定するのに使用する。 (訳注: \fBE\fP
-修飾å­\90ã\81¯æ\97¥æ\9c¬ã\81§ä½¿ç\94¨ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8bã\80\8cæ\98­å\92\8cã\80\8dã\80\8cå¹³æ\88\90ã\80\8d ã\81ªã\81©ã\81®å\85\83å\8f·ã\81«ã\82\88ã\82\8b年表è¨\98ã\82\92æ\8c\87å®\9aã\81\99ã\82\8bã\80\82glibc 2.2 ä»¥é\99\8dã\81§ã\81®ã\81¿æ\9c\89å\8a¹)
-.PP
-要素別の時刻構造体 \fItm\fP の詳細は \fI<time.h>\fP に定義されている。 \fBctime\fP(3)  も参照すること
+\fB%OV\fP, \fB%Ow\fP, \fB%OW\fP, \fB%Oy\fP, について記述がある。ここで \fBO\fP 修飾子は別形式の数値シンボル (ローマ数字とか)
+を指定するために使用する。 \fBE\fP 修飾子はロケール依存の別表現を指定するのに使用する。 \fBE\fP
+修飾å­\90ã\82\92使ã\81£ã\81\9få ´å\90\88ã\81®ã\83\87ã\83¼ã\82¿è¡¨ç\8f¾ã\81«é\81©ç\94¨ã\81\95ã\82\8cã\82\8bã\83«ã\83¼ã\83«ã\81¯ã\80\81 \fBnl_langinfo\fP(3) ã\81®å¼\95ã\81\8dæ\95°ã\81« \fBERA\fP
+を指定することで取得できる。このような別表現の例としては \fBja_JP\fP glibc ロケールでの日本の年号 (「昭和」「平成」など)
+によるカレンダー表記がある
 .SH 返り値
 .\" (This behavior applies since at least libc 4.4.4;
 .\" very old versions of libc, such as libc 4.4.1,
@@ -234,36 +262,51 @@ UNIX Specification) では \fB%Ec\fP, \fB%EC\fP, \fB%Ex\fP, \fB%EX\fP, \fB%Ey\fP
 終端のヌルバイトを含めた結果の文字列の長さが \fImax\fP バイトを超えなかった場合、 \fBstrftime\fP() 関数は配列 \fIs\fP
 に格納されたバイト数を返す (このバイト数に終端のヌルバイトは含まれない)。 終端のヌルバイトを含めた結果の文字列の長さが \fImax\fP
 バイトを超える場合には、 \fBstrftime\fP() は 0 を返し、配列の内容は不定となる。
-.LP
-返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。 例えば、多くのロケールでは \fB%p\fP は空文字列を返す。 同様に、空の
+.PP
+返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。例えば、多くのロケールでは \fB%p\fP は空文字列を返す。同様に、空の
 \fIformat\fP 文字列は空文字列を返す。
 .SH 環境変数
 環境変数 \fBTZ\fP と \fBLC_TIME\fP が使用される。 (訳注: \fBLC_ALL\fP が設定されている場合には \fBLC_TIME\fP
 よりもそちらが優先される。 \fBLC_TIME\fP も \fBLC_ALL\fP も設定されていない場合には \fBLANG\fP が使用される。)
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース       属性  値
+T{
+\fBstrftime\fP()
+T}     Thread safety   MT\-Safe env locale
+.TE
 .SH 準拠
-SVr4, C89, C99.  個々の変換が厳密にどの規格に含まれるかは、 ANSI C (印なし)、統一 UNIX 規格 (SU印)、Olson の
-timezone パッケージ (TZ印)、 glibc 独自 (GNU印) で示している。glibc2 では \fB%+\fP はサポートされていないが、
-いくつかの拡張が行われている。POSIX.1 では ANSI C のみを参照している。 POSIX.2 の \fBdate\fP(1)
-のところに記述されている幾つかの拡張は \fBstrftime\fP()  にも適用できるだろう。 \fB%F\fP 変換は C99 と POSIX.1\-2001
-にある。
-
-SUSv2 では、 \fB%S\fP は 00 から 61 の範囲をとると規定されている。 これは、1分間のうち閏秒が 2つ入る可能性が理論的にはあることを
-考慮してのものである (実際には、このような状況はこれまで一度も 起こっていない)。
+.\" FIXME strftime() is in POSIX.1-2001 and POSIX.1-2008, but the details
+.\" in the standards changed across versions. Investigate and
+.\" write up.
+SVr4, C89, C99. 個々の変換が厳密にどの規格に含まれるかをマークで示している。「マークなし」は ANSI C、「SU」は統一 UNIX
+規格を、「TZ」は Olson の timezone パッケージ、「GNU」は glibc を示す。 glibc2 では \fB%+\fP
+はサポートされていないが、 いくつかの拡張が行われている。POSIX.1 では ANSI C のみを参照している。 POSIX.2 の
+\fBdate\fP(1)  のところに記述されている幾つかの拡張は \fBstrftime\fP() にも適用できるだろう。 \fB%F\fP 変換は C99 と
+POSIX.1\-2001 にある。
+.PP
+SUSv2 では、 \fB%S\fP は 00 から 61 の範囲をとると規定されている。 これは、1 分間のうち閏秒が 2
+つ入る可能性が理論的にはあることを考慮してのものである (実際には、このような状況はこれまで一度も 起こっていない)。
 .SH 注意
-.SS "ISO\ 8601 の週・曜日表記 (Week Dates)"
+.SS "ISO\ 8601 の暦週日付"
 \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 日の月曜日から始まる。
+年の週 01 は 2010 年 1 月 4 日の月曜日から始まる。同様に、 2011 年 1 月の最初の 2 日は 2010 年の週 52
+の一部とみなされる。
 .SS "glibc での注意"
 .\" HP-UX and Tru64 also have features like this.
 glibc では変換指定にいくつか拡張を行っている (これらの拡張は POSIX.1\-2001 には規定されていないが、
-他のいくつかのシステムで同様の機能が提供されている)。 \(aq%\(aq 文字と変換指定文字の間に、オプションとして \fIflag\fP とフィールドの
+他のいくつかのシステムで同様の機能が提供されている)。 \(aq%\(aq 文字と変換指定文字の間に、オプションとして \fIフラグ\fP とフィールドの
 \fI幅\fP を指定できる (これらを指定する場合には \fBE\fP や \fBO\fP 修飾子の前に置く)。
-
-以下のフラグ文字が使用できる:
+.PP
+以下のフラグ文字が使用できる
 .TP 
 \fB_\fP
 (下線)  数値の結果文字列のパディング (穴埋め) をスペース (空白文字) で行う。
@@ -274,65 +317,72 @@ glibc では変換指定にいくつか拡張を行っている (これらの拡
 \fB0\fP
 変換指定文字がデフォルトではスペースでパディングを行う場合でも、 数値の結果文字列へのパディングを 0 で行う。
 .TP 
-\fB^\fP
+\fB\(ha\fP
 結果文字列中のアルファベット文字を大文字に変換する。
 .TP 
 \fB#\fP
 結果文字列の大文字・小文字を入れ替える (このフラグは特定の変換指定文字でしか機能しない。その中でも 本当に有用なのは \fB%Z\fP の場合だけである)。
 .PP
-オプションの10進数の幅指定子はフラグの後ろに置くことができる (フラグはなくてもよい)。フィールドの本来の大きさが指定された幅よりも
+オプションの 10 進数の幅指定子はフラグの後ろに置くことができる (フラグはなくてもよい)。フィールドの本来の大きさが指定された幅よりも
 小さい場合、結果文字列の左側は指定された幅までパディングされる。
 .SH バグ
\87ºå\8a\9bæ\96\87å­\97å\88\97ã\81\8c \fImax\fP ã\83\90ã\82¤ã\83\88ã\82\92è¶\85ã\81\88ã\81¦ã\81\97ã\81¾ã\81\86å ´å\90\88ã\80\81 \fIerrno\fP ã\81¯è¨­å®\9aã\80\8cã\81\95ã\82\8cã\81ªã\81\84ã\80\8dã\80\82 ã\81\93ã\81®ã\81\9fã\82\81ã\80\81ã\81\93ã\81®ã\82¨ã\83©ã\83¼ã\82\92、 \fIformat\fP
-文字列がきちんと処理されて長さ 0 の出力文字列が生成される場合を区別することができない。 POSIX.1\-2001 では \fBstrftime\fP()
\81§ \fIerrno\fP ã\81«è¨­å®\9aã\81\99る値について一切規定して「いない」。
-
\87ºå\8a\9bæ\96\87å­\97å\88\97ã\81\8c \fImax\fP ã\83\90ã\82¤ã\83\88ã\82\92è¶\85ã\81\88ã\81¦ã\81\97ã\81¾ã\81\86å ´å\90\88ã\80\81 \fIerrno\fP ã\81¯è¨­å®\9aã\80\8cã\81\95ã\82\8cã\81ªã\81\84ã\80\8dã\80\82 ã\81\93ã\81®ã\81\9fã\82\81ã\80\81ã\81\93ã\81®ã\82¨ã\83©ã\83¼ã\81¨、 \fIformat\fP
\96\87å­\97å\88\97ã\81\8cã\81\8dã\81¡ã\82\93ã\81¨å\87¦ç\90\86ã\81\95ã\82\8cã\81¦é\95·ã\81\95 0 ã\81®å\87ºå\8a\9bæ\96\87å­\97å\88\97ã\81\8cç\94\9fæ\88\90ã\81\95ã\82\8cã\82\8bå ´å\90\88ã\80\81ã\82\92å\8cºå\88¥ã\81\99ã\82\8bã\81\93ã\81¨ã\81\8cã\81§ã\81\8dã\81ªã\81\84ã\80\82 POSIX.1\-2001 ã\81§ã\81¯ \fBstrftime\fP()
\81«é\96¢ã\81\97ã\81¦ \fIerrno\fP ã\81«è¨­å®\9aã\81\95ã\82\8cる値について一切規定して「いない」。
+.PP
 \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
-を使うのはお薦めできることである。 \fB%c\fP を使うと適切な日付と時刻の表記を得ることができるからである。 \fBgcc\fP(1)
-のこの問題を回避しようとすると、何かすっきりしない気分になるだろう。 比較的きれいな解決方法は以下のような中間関数を追加することである。
+`%c\(aq yields only last 2 digits of year in some locales\fP (\fI警告:\fP
+いくつかのロケールでは \fI`%c\(aq\fP は年の下2桁しか出力しない\fI)。\fP もちろんプログラマが \fB%c\fP を使うのはお薦めできることである。
+\fB%c\fP を使うと適切な日付と時刻の表記を得ることができるからである。 \fBgcc\fP(1)
+のこの問題を回避しようとすると、何かすっきりしない気分になるだろう。 比較的きれいな回避策は以下のような中間関数を追加することである。
+.PP
 .in +4n
-.nf
-
+.EX
 size_t
 my_strftime(char *s, size_t max, const char *fmt,
             const struct tm *tm)
 {
     return strftime(s, max, fmt, tm);
 }
-.fi
+.EE
 .in
-
+.PP
 現在では、 \fBgcc\fP(1)  はこの警告を抑えるための \fI\-Wno\-format\-y2k\fP オプションを
 提供しており、上記の回避策はもはや必要ない。
 .SH 例
 \fBRFC\ 2822 準拠の日付形式\fP (%a と %b は英語ロケール)
 .PP
-.in +2n
-"%a,\ %d\ %b\ %Y\ %T\ %z"
+.in +4n
+.EX
+ "%a,\ %d\ %b\ %Y\ %T\ %z"
+.EE
+.in
 .PP
 \fBRFC\ 822 準拠の日付形式\fP (%a と %b は英語ロケール)
 .PP
-.in +2n
-"%a,\ %d\ %b\ %y\ %T\ %z"
+.in +4n
+.EX
+ "%a,\ %d\ %b\ %y\ %T\ %z"
+.EE
+.in
 .SS サンプルプログラム
-以下のプログラムを使うと \fBstrftime\fP()  の実験ができる。
+以下のプログラムを使うと \fBstrftime\fP() の実験ができる。
+.PP
+以下に \fBstrftime\fP() の glibc 実装が生成する結果の例をいくつか示す。
 .PP
-以下に、 \fBstrftime\fP()  の glibc 実装が生成する結果の例をいくつか示す:
 .in +4n
-.nf
-
+.EX
 $\fB ./a.out \(aq%m\(aq\fP
 Result string is "11"
 $\fB ./a.out \(aq%5m\(aq\fP
 Result string is "00011"
 $\fB ./a.out \(aq%_5m\(aq\fP
 Result string is "   11"
-.fi
+.EE
 .in
 .SS プログラムのソース
-.nf
+\&
+.EX
 #include <time.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -359,11 +409,10 @@ main(int argc, char *argv[])
     printf("Result string is \e"%s\e"\en", outstr);
     exit(EXIT_SUCCESS);
 }
-.fi
+.EE
 .SH 関連項目
-\fBdate\fP(1), \fBtime\fP(2), \fBctime\fP(3), \fBsetlocale\fP(3), \fBsprintf\fP(3),
-\fBstrptime\fP(3)
+ \fBdate\fP(1), \fBtime\fP(2), \fBctime\fP(3), \fBnl_langinfo\fP(3), \fBsetlocale\fP(3),
+\fBsprintf\fP(3), \fBstrptime\fP(3)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
-である。プロジェクトの説明とバグ報告に関する情報は
-http://www.kernel.org/doc/man\-pages/ に書かれている。
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
index 37dc42b..a967b52 100644 (file)
@@ -11,7 +11,6 @@ futimes.3,41,1,42
 gettimeofday.2,41,11,52
 nanosleep.2,40,3,43
 stime.2,26,3,29
-strftime.3,121,38,159
 strptime.3,148,1,149
 time.1,105,5,110
 time.2,26,6,32
index d4f54bb..4bf5e46 100644 (file)
 ※:LDP man-pages:5.10:2019/03/06:strfromf:3:strfromd:3:
 ※:LDP man-pages:5.10:2019/03/06:strfroml:3:strfromd:3:
 ○:LDP man-pages:5.10:2019/03/06:strfry:3:2021/04/13::motoki@hal.t.u-tokyo.ac.jp:Akihiro Motoki:
\98\86:LDP man-pages:3.79=>5.10:2020/08/13:strftime:3:2015/02/05::amotoki@gmail.com:Akihiro Motoki:
\97\8b:LDP man-pages:5.10:2020/08/13:strftime:3:2021/06/20::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:5.10:2019/03/06:string:3:2021/04/13::yoshino@civil.jcn.nihon-u.ac.jp:YOSHINO Takashi:
 ○:LDP man-pages:5.10:2019/03/06:strlen:3:2021/04/13::amotoki@gmail.com:Akihiro Motoki:
 @:LDP man-pages:5.10:2017/09/15:strncasecmp:3:strcasecmp:3:
index bfc1df1..958a5f7 100644 (file)
 <TR class="over70"><TD>gettimeofday.2</TD><TD>11/52</TD><TD>78.85</TD></TR>
 <TR class="over80"><TD>nanosleep.2</TD><TD>3/43</TD><TD>93.02</TD></TR>
 <TR class="over80"><TD>stime.2</TD><TD>3/29</TD><TD>89.66</TD></TR>
-<TR class="over70"><TD>strftime.3</TD><TD>38/159</TD><TD>76.10</TD></TR>
 <TR class="over80"><TD>strptime.3</TD><TD>1/149</TD><TD>99.33</TD></TR>
 <TR class="over80"><TD>time.1</TD><TD>5/110</TD><TD>95.45</TD></TR>
 <TR class="over80"><TD>time.2</TD><TD>6/32</TD><TD>81.25</TD></TR>
 <TR class="title"><TD COLSPAN=3>Summary</TD></TR>
 <TR><TD COLSPAN=3>
 <UL>
-<LI>Total uncompleted: 576
+<LI>Total uncompleted: 575
 <LI>&gt;=80%: 404
-<LI>&gt;=70%: 45
+<LI>&gt;=70%: 44
 <LI>&gt;=60%: 36
 <LI>&lt;60%: 91
 </UL>