• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

翻訳ドキュメント管理用


Commit MetaInfo

Revisiónb687e539a8277ed8a36affcba6aaf2a668ee7490 (tree)
Tiempo2021-06-22 00:35:40
AutorAkihiro Motoki <amotoki@user...>
CommiterAkihiro Motoki

Log Message

Merge pull request #42254 (amotoki/jm/work-strftime.3 into master).

Cambiar Resumen

Diferencia incremental

--- a/manual/LDP_man-pages/add_ja/copyright/man3/strftime.3
+++ b/manual/LDP_man-pages/add_ja/copyright/man3/strftime.3
@@ -12,4 +12,5 @@ PO4A-HEADER: mode=before; position=^\.TH
1212 .\" Updated 2012-05-29, Akihiro MOTOKI <amotoki@gmail.com>
1313 .\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
1414 .\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
15+.\" Updated 2021-04-13, Akihiro Motoki <amotoki@gmail.com>
1516 .\"
--- /dev/null
+++ b/manual/LDP_man-pages/draft/man3/strftime.3
@@ -0,0 +1,418 @@
1+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2+.\"
3+.\" %%%LICENSE_START(VERBATIM)
4+.\" Permission is granted to make and distribute verbatim copies of this
5+.\" manual provided the copyright notice and this permission notice are
6+.\" preserved on all copies.
7+.\"
8+.\" Permission is granted to copy and distribute modified versions of this
9+.\" manual under the conditions for verbatim copying, provided that the
10+.\" entire resulting derived work is distributed under the terms of a
11+.\" permission notice identical to this one.
12+.\"
13+.\" Since the Linux kernel and libraries are constantly changing, this
14+.\" manual page may be incorrect or out-of-date. The author(s) assume no
15+.\" responsibility for errors or omissions, or for damages resulting from
16+.\" the use of the information contained herein. The author(s) may not
17+.\" have taken the same level of care in the production of this manual,
18+.\" which is licensed free of charge, as they might when working
19+.\" professionally.
20+.\"
21+.\" Formatted or processed versions of this manual, if unaccompanied by
22+.\" the source, must acknowledge the copyright and authors of this work.
23+.\" %%%LICENSE_END
24+.\"
25+.\" References consulted:
26+.\" Linux libc source code
27+.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28+.\" 386BSD man pages
29+.\" GNU texinfo documentation on glibc date/time functions.
30+.\" Modified Sat Jul 24 18:03:44 1993 by Rik Faith (faith@cs.unc.edu)
31+.\" Applied fix by Wolfgang Franke, aeb, 961011
32+.\" Corrected return value, aeb, 970307
33+.\" Added Single UNIX Spec conversions and %z, aeb/esr, 990329.
34+.\" 2005-11-22 mtk, added Glibc Notes covering optional 'flag' and
35+.\" 'width' components of conversion specifications.
36+.\"
37+.\"*******************************************************************
38+.\"
39+.\" This file was generated with po4a. Translate the source file.
40+.\"
41+.\"*******************************************************************
42+.\"
43+.\" Japanese Version Copyright (c) 2000 HANATAKA Shinya
44+.\" all rights reserved.
45+.\" Translated 2000-10-10, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
46+.\" Updated 2002-01-09, Kentaro Shirakata <argrath@ub32.org>
47+.\" Updated 2002-01-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
48+.\" Updated 2005-02-26, Akihiro MOTOKI
49+.\" Updated 2005-04-17, Akihiro MOTOKI
50+.\" Updated 2005-12-05, Akihiro MOTOKI, LDP v2.16
51+.\" Updated 2010-04-18, Akihiro MOTOKI, LDP v3.24
52+.\" Updated 2012-05-29, Akihiro MOTOKI <amotoki@gmail.com>
53+.\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
54+.\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
55+.\" Updated 2021-04-13, Akihiro Motoki <amotoki@gmail.com>
56+.\"
57+.TH STRFTIME 3 " 2020\-08\-13" GNU "Linux Programmer's Manual"
58+.SH 名前
59+strftime \- 日付および時刻の文字列への変換
60+.SH 書式
61+.nf
62+\fB#include <time.h>\fP
63+.PP
64+\fBsize_t strftime(char *\fP\fIs\fP\fB, size_t \fP\fImax\fP\fB, const char *\fP\fIformat\fP\fB,\fP
65+\fB const struct tm *\fP\fItm\fP\fB);\fP
66+.fi
67+.SH 説明
68+.\" FIXME . POSIX says: Local timezone information is used as though
69+.\" strftime() called tzset(). But this doesn't appear to be the case
70+\fBstrftime\fP() 関数 は、要素別の時刻 \fItm\fP の内容を \fIformat\fP で指定された書式指定にしたがって変換し、長さ \fImax\fP
71+の文字列 \fIs\fP に書き込む。要素別の時刻構造体 \fItm\fP は \fI<time.h>\fP で定義されている。 \fBctime\fP(3)
72+も参照。
73+.PP
74+書式指定はヌル終端された文字列であり、「変換指定 (conversion
75+specification)」と呼ばれる特別な文字列を含めることができる。各々の変換指定は \(aq%\(aq 文字で始まり、「変換指定文字
76+(conversion specifier character)」と呼ばれる何らか他の文字で終端される。上記以外の全ての文字列は「通常の文字列
77+(ordinary character sequence)」となる。
78+.PP
79+(NULL バイトも含む) 通常の文字列内の文字は、そのまま \fIformat\fP から \fIs\fP
80+にコピーされる。一方、変換指定の文字は以下のリストに示すように置換される。このリストでは、 \fItm\fP
81+構造体のフィールドが参照される場合、その情報も記載している。
82+.TP
83+\fB%a\fP
84+現在のロケールにおける曜日の省略名。 \fItm_wday\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
85+\fBABDAY_\fP{\fB1\fP\(en\fB7\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
86+.TP
87+\fB%A\fP
88+現在のロケールにおける曜日の完全な名前。 \fItm_wday\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
89+\fBDAY_\fP{\fB1\fP\(en\fB7\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
90+.TP
91+\fB%b\fP
92+現在のロケールにおける月の省略名。 \fItm_mon\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
93+\fBABMON_\fP{\fB1\fP\(en\fB12\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
94+.TP
95+\fB%B\fP
96+現在のロケールにおける月の完全な名前。 \fItm_mon\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
97+\fBMON_\fP{\fB1\fP\(en\fB12\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
98+.TP
99+\fB%c\fP
100+現在のロケールにおいて一般的な日付・時刻の表記。現在のロケールで使用される具体的なフォーマットは、 \fB%c\fP 変換指定の場合は \fBD_T_FMT\fP
101+を、 \fB%Ec\fP 変換指定の場合は \fBERA_D_T_FMT\fP を引き数に指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
102+POSIX ロケールでは \fB%a %b %e %H:%M:%S %Y\fP と等価である。
103+.TP
104+\fB%C\fP
105+世紀に対応する 2 桁の整数 (year/1000)。 \fB%EC\fP 変換指定は、西暦以外の年数表記 ("era") の名前に対応する。
106+\fItm_year\fP から計算される。 (SU)
107+.TP
108+\fB%d\fP
109+月内通算日 (10 進数表記) (01\-31)。 \fItm_mday\fP から計算される。
110+.TP
111+\fB%D\fP
112+\fB%m/%d/%y\fP と等価。(うえっ、アメリカ専用だ。アメリカ以外の国では \fB%d/%m/%y\fP
113+の方が一般的だ。紛らわしいので、使用すべきではない。) (SU)
114+.TP
115+\fB%e\fP
116+\fB%d\fP と同様に月内通算日を 10 進数で表現するが、 1 桁の場合 10 の位にゼロを置かずスペースを置く。 \fItm_mday\fP
117+から計算される。 (SU)
118+.TP
119+\fB%E\fP
120+別形式 (西暦以外の年数表記; "era") を使用する際の修飾子。下記参照。 (SU)
121+.TP
122+\fB%F\fP
123+\fB%Y\-%m\-%d\fP と等価 (ISO\ 8601 形式の日付フォーマット)。 (C99)
124+.TP
125+\fB%G\fP
126+ISO\ 8601 の週 (ISO\ 8601 week) に基づく年の表示。「注意」の節を参照)。世紀も 10 進数で表す。 ISO 週番号
127+(\fB%V\fP を参照) に対応した 4 桁の西暦年。 これは基本的には \fB%Y\fP と同じ形式だが、ISO
128+週数が前年や翌年になる場合にはその年が使用される点が異なる。 \fItm_year\fP, \fItm_yday\fP, \fItm_wday\fP から計算される。
129+(TZ)
130+.TP
131+\fB%g\fP
132+\fB%G\fP と同様。ただし、世紀を含まず下 2 桁のみを表示 (00\(en99)。 \fItm_year\fP, \fItm_yday\fP,
133+\fItm_wday\fP から計算される。 (TZ)
134+.TP
135+\fB%h\fP
136+\fB%b\fP と等価 (SU)
137+.TP
138+\fB%H\fP
139+24 時間表記での時 (hour) (00\-23)。 \fItm_hour\fP から計算される。
140+.TP
141+\fB%I\fP
142+12 時間表記での時 (hour) (01\-12)。 \fItm_hour\fP から計算される。
143+.TP
144+\fB%j\fP
145+年の初めから通算の日数 (001\-366)。 \fItm_yday\fP から計算される。
146+.TP
147+\fB%k\fP
148+24 時間表記での時 (0\-23)。 1 桁の場合には前にゼロでなくスペースが置かれる。 \fB%H\fP も参照。 \fItm_hour\fP から計算される。
149+(TZ)
150+.TP
151+\fB%l\fP
152+12 時間表記での時 (0\-12)。 1 桁の場合には前にゼロでなくスペースが置かれる。 \fB%I\fP も参照。 \fItm_hour\fP から計算される。
153+(TZ)
154+.TP
155+\fB%m\fP
156+10 進数表記の月 (01\-12)。 \fItm_mon\fP から計算される。
157+.TP
158+\fB%M\fP
159+10 進数表記の分 (00\-59)。 \fItm_min\fP から計算される。
160+.TP
161+\fB%n\fP
162+改行 (SU)
163+.TP
164+\fB%O\fP
165+別の数値シンボルを使用する際の修飾子。下記参照。 (SU)
166+.TP
167+\fB%p\fP
168+現在のロケールにおける「午前」「午後」に相当する文字列。 英語の場合には "AM" または "PM" となる。
169+正午は「午後」、真夜中は「午前」として扱われる。 \fItm_hour\fP から計算される。現在のロケールで "AM" と "PM"
170+に対応する文字列表現は、それぞれ \fBAM_STR\fP と \fBPM_STR\fP を指定して \fBnl_langinfo\fP(3)
171+を呼び出すことで取得できる。
172+.TP
173+\fB%P\fP
174+\fB%p\fP と同様であるが小文字が使用される。 "am" や "pm"、もしくは現在のロケールでの対応する文字列となる。 \fItm_hour\fP
175+から計算される。 (GNU)
176+.TP
177+\fB%r\fP
178+午前・午後形式での時刻。現在のロケールで使用される具体的なフォーマットは、引き数に \fBT_FMT_AMPM\fP を指定して
179+\fBnl_langinfo\fP(3) を呼び出すことで取得できる。 POSIX ロケールでは \fB%I:%M:%S %p\fP と等価である。 (SU)
180+.TP
181+\fB%R\fP
182+24 時間表記での時刻、秒は表示しない (\fB%H:%M\fP)。 秒を含んだものは以下の \fB%T\fP を参照すること。(SU)
183+.TP
184+\fB%s\fP
185+紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数。 \fImktime(tm)\fP から計算される。
186+(TZ)
187+.TP
188+\fB%S\fP
189+秒 (10 進数表記) (00\-60)。時々ある閏秒に対応するため、値の範囲は 60 までとなっている。 \fItm_sec\fP から計算される。
190+.TP
191+\fB%t\fP
192+タブ文字 (SU)
193+.TP
194+\fB%T\fP
195+24 時間表記の時間 (\fB%H:%M:%S\fP) (SU)
196+.TP
197+\fB%u\fP
198+週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1\-7)。 \fB%w\fP も参照。 \fItm_wday\fP から計算される。 (SU)
199+.TP
200+\fB%U\fP
201+年の初めからの通算の週番号 (10 進数表記) (00\-53)。 その年の最初の日曜日を、第 1 週の始まりとして計算する。 \fB%V\fP と \fB%W\fP
202+も参照すること。 \fItm_yday\fP と \fItm_wday\fP から計算される。
203+.TP
204+\fB%V\fP
205+ISO\ 8601 形式での年の始めからの週番号 (「注意」の節を参照)。 10 進数表記で、01 から 53
206+の値となる。週番号は、新しい年が少なくとも 4 日以上含まれる最初の週を 1 として計算する。 \fB%U\fP と \fB%W\fP も参照のこと。
207+\fItm_year\fP, \fItm_yday\fP, \fItm_wday\fP から計算される。 (SU)
208+.TP
209+\fB%w\fP
210+週の何番目の日 (10 進数表記) か。日曜日を 0 とする。(0\-6)。 \fB%u\fP も参照。 \fItm_wday\fP から計算される。
211+.TP
212+\fB%W\fP
213+年の初めからの通算の週番号 (10 進数表記) (00\-53)。 その年の最初の月曜日を、第 1 週の始まりとして計算する。 \fB%V\fP と \fB%W\fP
214+も参照すること。 \fItm_yday\fP と \fItm_wday\fP から計算される。
215+.TP
216+\fB%x\fP
217+現在のロケールで一般的な日付表記。時刻は含まない。現在のロケールで使用される具体的なフォーマットは、 \fB%x\fP 変換指定の場合は \fBD_FMT\fP
218+を、 \fB%Ex\fP 変換指定の場合は \fBERA_D_FMT\fP を引き数に指定して、 \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
219+POSIX ロケールでは、これは \fB%m/%d/%y\fP と等価である。
220+.TP
221+\fB%X\fP
222+現在のロケールで一般的な時刻表記。日付は含まない。現在のロケールで使用される具体的なフォーマットは、 \fB%X\fP 変換指定の場合は \fBT_FMT\fP
223+を、 \fB%EX\fP 変換指定の場合は \fBERA_T_FMT\fP を引き数に指定して、 \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
224+POSIX ロケールでは、これは \fB%H:%M:%S\fP と等価である。
225+.TP
226+\fB%y\fP
227+西暦の下 2 桁 (世紀部分を含まない年) (00 から 99)。 \fB%Ey\fP 変換指定は。 \fB%EC\fP 変換指定で示される西暦以外の年数表記
228+("era") における初めからの年数に対応する。 \fItm_year\fP から計算される。
229+.TP
230+\fB%Y\fP
231+世紀部分を含めた 10 進表記の西暦年。 \fB%EY\fP 変換指定は別形式の年表記の完全な表現に対応する。 \fItm_year\fP から計算される。
232+.TP
233+\fB%z\fP
234+\fI+hhmm\fP や \fI\-hhmm\fP の形式のタイムゾーン (UTC へのオフセット時間)。(SU)
235+.TP
236+\fB%Z\fP
237+タイムゾーン名または省略名。
238+.TP
239+\fB%+\fP
240+.\" Nov 05 -- Not in Linux/glibc, but is in some BSDs (according to
241+.\" their man pages)
242+\fBdate\fP(1) 形式での日時。 glibc2 ではサポートされていない。 (TZ)
243+.TP
244+\fB%%\fP
245+\(aq%\(aq 文字
246+.PP
247+いくつかの変換指定では、変換指定文字の前に \fBE\fP や \fBO\fP 「修飾子」を置くことによって別書式を使用するように指定することができる。
248+現在のロケールにおいて別書式が存在しない場合には、 通常の変換指定が使用されたかのように動作する (SU)。 統一 UNIX 規格 (Single
249+UNIX Specification) では \fB%Ec\fP, \fB%EC\fP, \fB%Ex\fP, \fB%EX\fP, \fB%Ey\fP, \fB%EY\fP,
250+\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,
251+\fB%OV\fP, \fB%Ow\fP, \fB%OW\fP, \fB%Oy\fP, について記述がある。ここで \fBO\fP 修飾子は別形式の数値シンボル (ローマ数字とか)
252+を指定するために使用する。 \fBE\fP 修飾子はロケール依存の別表現を指定するのに使用する。 \fBE\fP
253+修飾子を使った場合のデータ表現に適用されるルールは、 \fBnl_langinfo\fP(3) の引き数に \fBERA\fP
254+を指定することで取得できる。このような別表現の例としては \fBja_JP\fP glibc ロケールでの日本の年号 (「昭和」「平成」など)
255+によるカレンダー表記がある。
256+.SH 返り値
257+.\" (This behavior applies since at least libc 4.4.4;
258+.\" very old versions of libc, such as libc 4.4.1,
259+.\" would return
260+.\" .I max
261+.\" if the array was too small.)
262+終端のヌルバイトを含めた結果の文字列の長さが \fImax\fP バイトを超えなかった場合、 \fBstrftime\fP() 関数は配列 \fIs\fP
263+に格納されたバイト数を返す (このバイト数に終端のヌルバイトは含まれない)。 終端のヌルバイトを含めた結果の文字列の長さが \fImax\fP
264+バイトを超える場合には、 \fBstrftime\fP() は 0 を返し、配列の内容は不定となる。
265+.PP
266+返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。例えば、多くのロケールでは \fB%p\fP は空文字列を返す。同様に、空の
267+\fIformat\fP 文字列は空文字列を返す。
268+.SH 環境変数
269+環境変数 \fBTZ\fP と \fBLC_TIME\fP が使用される。 (訳注: \fBLC_ALL\fP が設定されている場合には \fBLC_TIME\fP
270+よりもそちらが優先される。 \fBLC_TIME\fP も \fBLC_ALL\fP も設定されていない場合には \fBLANG\fP が使用される。)
271+.SH 属性
272+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
273+.TS
274+allbox;
275+lb lb lb
276+l l l.
277+インターフェース 属性 値
278+T{
279+\fBstrftime\fP()
280+T} Thread safety MT\-Safe env locale
281+.TE
282+.SH 準拠
283+.\" FIXME strftime() is in POSIX.1-2001 and POSIX.1-2008, but the details
284+.\" in the standards changed across versions. Investigate and
285+.\" write up.
286+SVr4, C89, C99. 個々の変換が厳密にどの規格に含まれるかをマークで示している。「マークなし」は ANSI C、「SU」は統一 UNIX
287+規格を、「TZ」は Olson の timezone パッケージ、「GNU」は glibc を示す。 glibc2 では \fB%+\fP
288+はサポートされていないが、 いくつかの拡張が行われている。POSIX.1 では ANSI C のみを参照している。 POSIX.2 の
289+\fBdate\fP(1) のところに記述されている幾つかの拡張は \fBstrftime\fP() にも適用できるだろう。 \fB%F\fP 変換は C99 と
290+POSIX.1\-2001 にある。
291+.PP
292+SUSv2 では、 \fB%S\fP は 00 から 61 の範囲をとると規定されている。 これは、1 分間のうち閏秒が 2
293+つ入る可能性が理論的にはあることを考慮してのものである (実際には、このような状況はこれまで一度も 起こっていない)。
294+.SH 注意
295+.SS "ISO\ 8601 の暦週日付"
296+\fB%G\fP, \fB%g\fP, \fB%V\fP は、ISO\ 8601 標準により定義された週単位表記の年により 計算される値を出力する。 ISO\ 8601
297+標準の週単位表記では、週は月曜日から開始され、 週番号は、年の最初の週が 01 となり、最後の週は 52 か 53 となる。 週 01 は、新しい年が
298+4 日以上含まれる最初の週である。 言い換えると、週 01 は、その年の木曜日を含む最初の週、 つまり 1 月 4 日を含む週ということである。
299+新しい年のカレンダー上の最初の週に新しい年が 3 日以下しか含まれない場合、 ISO\ 8601 の週単位表記では、これらの日を前の年の週 53
300+の一部とみなす。 例えば、2010 年 1 月 1 日は金曜日であり、 その週には 2010 年の日が 3 日しか含まれない。 したがって、ISO\ 8601 の週単位表記では、これらの日は 2009 年 (\fB%G\fP) の週 53 (\fB%V\fP) の一部となる。 ISO\ 8601 の 2010
301+年の週 01 は 2010 年 1 月 4 日の月曜日から始まる。同様に、 2011 年 1 月の最初の 2 日は 2010 年の週 52
302+の一部とみなされる。
303+.SS "glibc での注意"
304+.\" HP-UX and Tru64 also have features like this.
305+glibc では変換指定にいくつか拡張を行っている (これらの拡張は POSIX.1\-2001 には規定されていないが、
306+他のいくつかのシステムで同様の機能が提供されている)。 \(aq%\(aq 文字と変換指定文字の間に、オプションとして \fIフラグ\fP とフィールドの
307+\fI幅\fP を指定できる (これらを指定する場合には \fBE\fP や \fBO\fP 修飾子の前に置く)。
308+.PP
309+以下のフラグ文字が使用できる。
310+.TP
311+\fB_\fP
312+(下線) 数値の結果文字列のパディング (穴埋め) をスペース (空白文字) で行う。
313+.TP
314+\fB\-\fP
315+(ダッシュ) 数値の結果文字列に対するパディングを行わない。
316+.TP
317+\fB0\fP
318+変換指定文字がデフォルトではスペースでパディングを行う場合でも、 数値の結果文字列へのパディングを 0 で行う。
319+.TP
320+\fB\(ha\fP
321+結果文字列中のアルファベット文字を大文字に変換する。
322+.TP
323+\fB#\fP
324+結果文字列の大文字・小文字を入れ替える (このフラグは特定の変換指定文字でしか機能しない。その中でも 本当に有用なのは \fB%Z\fP の場合だけである)。
325+.PP
326+オプションの 10 進数の幅指定子はフラグの後ろに置くことができる (フラグはなくてもよい)。フィールドの本来の大きさが指定された幅よりも
327+小さい場合、結果文字列の左側は指定された幅までパディングされる。
328+.SH バグ
329+出力文字列が \fImax\fP バイトを超えてしまう場合、 \fIerrno\fP は設定「されない」。 このため、このエラーと、 \fIformat\fP
330+文字列がきちんと処理されて長さ 0 の出力文字列が生成される場合、を区別することができない。 POSIX.1\-2001 では \fBstrftime\fP()
331+に関して \fIerrno\fP に設定される値について一切規定して「いない」。
332+.PP
333+\fBgcc\fP(1) のいくつかのバージョンにはおかしなところがあり、 \fB%c\fP の使用法について以下のような警告を出す: \fIwarning:
334+`%c\(aq yields only last 2 digits of year in some locales\fP (\fI警告:\fP
335+いくつかのロケールでは \fI`%c\(aq\fP は年の下2桁しか出力しない\fI)。\fP もちろんプログラマが \fB%c\fP を使うのはお薦めできることである。
336+\fB%c\fP を使うと適切な日付と時刻の表記を得ることができるからである。 \fBgcc\fP(1)
337+のこの問題を回避しようとすると、何かすっきりしない気分になるだろう。 比較的きれいな回避策は以下のような中間関数を追加することである。
338+.PP
339+.in +4n
340+.EX
341+size_t
342+my_strftime(char *s, size_t max, const char *fmt,
343+ const struct tm *tm)
344+{
345+ return strftime(s, max, fmt, tm);
346+}
347+.EE
348+.in
349+.PP
350+現在では、 \fBgcc\fP(1) はこの警告を抑えるための \fI\-Wno\-format\-y2k\fP オプションを
351+提供しており、上記の回避策はもはや必要ない。
352+.SH 例
353+\fBRFC\ 2822 準拠の日付形式\fP (%a と %b は英語ロケール)
354+.PP
355+.in +4n
356+.EX
357+ "%a,\ %d\ %b\ %Y\ %T\ %z"
358+.EE
359+.in
360+.PP
361+\fBRFC\ 822 準拠の日付形式\fP (%a と %b は英語ロケール)
362+.PP
363+.in +4n
364+.EX
365+ "%a,\ %d\ %b\ %y\ %T\ %z"
366+.EE
367+.in
368+.SS サンプルプログラム
369+以下のプログラムを使うと \fBstrftime\fP() の実験ができる。
370+.PP
371+以下に \fBstrftime\fP() の glibc 実装が生成する結果の例をいくつか示す。
372+.PP
373+.in +4n
374+.EX
375+$\fB ./a.out \(aq%m\(aq\fP
376+Result string is "11"
377+$\fB ./a.out \(aq%5m\(aq\fP
378+Result string is "00011"
379+$\fB ./a.out \(aq%_5m\(aq\fP
380+Result string is " 11"
381+.EE
382+.in
383+.SS プログラムのソース
384+\&
385+.EX
386+#include <time.h>
387+#include <stdio.h>
388+#include <stdlib.h>
389+
390+int
391+main(int argc, char *argv[])
392+{
393+ char outstr[200];
394+ time_t t;
395+ struct tm *tmp;
396+
397+ t = time(NULL);
398+ tmp = localtime(&t);
399+ if (tmp == NULL) {
400+ perror("localtime");
401+ exit(EXIT_FAILURE);
402+ }
403+
404+ if (strftime(outstr, sizeof(outstr), argv[1], tmp) == 0) {
405+ fprintf(stderr, "strftime returned 0");
406+ exit(EXIT_FAILURE);
407+ }
408+
409+ printf("Result string is \e"%s\e"\en", outstr);
410+ exit(EXIT_SUCCESS);
411+}
412+.EE
413+.SH 関連項目
414+ \fBdate\fP(1), \fBtime\fP(2), \fBctime\fP(3), \fBnl_langinfo\fP(3), \fBsetlocale\fP(3),
415+\fBsprintf\fP(3), \fBstrptime\fP(3)
416+.SH この文書について
417+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
418+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
--- a/manual/LDP_man-pages/po4a/time/po/ja.po
+++ b/manual/LDP_man-pages/po4a/time/po/ja.po
@@ -7,7 +7,7 @@ msgid ""
77 msgstr ""
88 "Project-Id-Version: PACKAGE VERSION\n"
99 "POT-Creation-Date: 2021-03-12 14:01+0900\n"
10-"PO-Revision-Date: 2021-04-09 18:21+0900\n"
10+"PO-Revision-Date: 2021-05-02 05:13+0900\n"
1111 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1212 "Language-Team: LANGUAGE <LL@li.org>\n"
1313 "Language: \n"
@@ -6236,19 +6236,12 @@ msgstr ""
62366236 #. strftime() called tzset(). But this doesn't appear to be the case
62376237 #. type: Plain text
62386238 #: build/C/man3/strftime.3:67
6239-#, fuzzy
6240-#| msgid ""
6241-#| "The B<strftime>() function formats the broken-down time I<tm> according "
6242-#| "to the format specification I<format> and places the result in the "
6243-#| "character array I<s> of size I<max>."
62446239 msgid ""
62456240 "The B<strftime>() function formats the broken-down time I<tm> according to "
62466241 "the format specification I<format> and places the result in the character "
62476242 "array I<s> of size I<max>. The broken-down time structure I<tm> is defined "
62486243 "in I<E<lt>time.hE<gt>>. See also B<ctime>(3)."
6249-msgstr ""
6250-"B<strftime>() 関数 は、要素別の時刻 I<tm> の内容を I<format> で指定された書"
6251-"式指定にしたがって変換し、 長さ I<max> の文字列 I<s> に書き込む。"
6244+msgstr "B<strftime>() 関数 は、要素別の時刻 I<tm> の内容を I<format> で指定された書式指定にしたがって変換し、長さ I<max> の文字列 I<s> に書き込む。要素別の時刻構造体 I<tm> は I<E<lt>time.hE<gt>> で定義されている。 B<ctime>(3) も参照。"
62526245
62536246 #. type: Plain text
62546247 #: build/C/man3/strftime.3:76
@@ -6258,28 +6251,16 @@ msgid ""
62586251 "introduced by a \\(aq%\\(aq character and terminated by some other character "
62596252 "known as a I<conversion specifier character>. All other character sequences "
62606253 "are I<ordinary character sequences>."
6261-msgstr ""
6262-"書式指定はヌル終端された文字列であり、 「変換指定 (conversion "
6263-"specification)」と呼ばれる特別な文字列を 含まることができる。 各々の変換指定"
6264-"は \\(aq%\\(aq 文字で始まり、 「変換指定文字 (conversion specifier "
6265-"character)」と呼ばれる 何らか他の文字で終端される。上記以外の全ての文字列は "
6266-"「通常の文字列 (ordinary character sequence)」となる。"
6254+msgstr "書式指定はヌル終端された文字列であり、「変換指定 (conversion specification)」と呼ばれる特別な文字列を含めることができる。各々の変換指定は \\(aq%\\(aq 文字で始まり、「変換指定文字 (conversion specifier character)」と呼ばれる何らか他の文字で終端される。上記以外の全ての文字列は「通常の文字列 (ordinary character sequence)」となる。"
62676255
62686256 #. type: Plain text
62696257 #: build/C/man3/strftime.3:87
6270-#, fuzzy
6271-#| msgid ""
6272-#| "The characters of ordinary character sequences (including the null byte) "
6273-#| "are copied verbatim from I<format> to I<s>. However, the characters of "
6274-#| "conversion specifications are replaced as follows:"
62756258 msgid ""
62766259 "The characters of ordinary character sequences (including the null byte) "
62776260 "are copied verbatim from I<format> to I<s>. However, the characters of "
62786261 "conversion specifications are replaced as shown in the list below. In this "
62796262 "list, the field(s) employed from the I<tm> structure are also shown."
6280-msgstr ""
6281-"(NULL バイトも含む) 通常の文字列内の文字は、 そのまま I<format> から I<s> に"
6282-"コピーされる。 一方、変換指定の文字は以下のように置換される。"
6263+msgstr "(NULL バイトも含む) 通常の文字列内の文字は、そのまま I<format> から I<s> にコピーされる。一方、変換指定の文字は以下のリストに示すように置換される。このリストでは、 I<tm> 構造体のフィールドが参照される場合、その情報も記載している。"
62836264
62846265 #. type: TP
62856266 #: build/C/man3/strftime.3:87
@@ -6294,7 +6275,7 @@ msgid ""
62946275 "locale. (Calculated from I<tm_wday>.) (The specific names used in the "
62956276 "current locale can be obtained by calling B<nl_langinfo>(3) with "
62966277 "B<ABDAY_>{B<1>\\(enB<7>} as an argument.)"
6297-msgstr ""
6278+msgstr "現在のロケールにおける曜日の省略名。 I<tm_wday> から計算される。現在のロケールで使用される具体的な名前は、引き数に B<ABDAY_>{B<1>\\(enB<7>} を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。"
62986279
62996280 #. type: TP
63006281 #: build/C/man3/strftime.3:97
@@ -6309,7 +6290,7 @@ msgid ""
63096290 "(Calculated from I<tm_wday>.) (The specific names used in the current "
63106291 "locale can be obtained by calling B<nl_langinfo>(3) with B<DAY_>{B<1>"
63116292 "\\(enB<7>} as an argument.)"
6312-msgstr ""
6293+msgstr "現在のロケールにおける曜日の完全な名前。 I<tm_wday> から計算される。現在のロケールで使用される具体的な名前は、引き数に B<DAY_>{B<1>\\(enB<7>} を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。"
63136294
63146295 #. type: TP
63156296 #: build/C/man3/strftime.3:107
@@ -6324,7 +6305,7 @@ msgid ""
63246305 "from I<tm_mon>.) (The specific names used in the current locale can be "
63256306 "obtained by calling B<nl_langinfo>(3) with B<ABMON_>{B<1>\\(enB<12>} as an "
63266307 "argument.)"
6327-msgstr ""
6308+msgstr "現在のロケールにおける月の省略名。 I<tm_mon> から計算される。現在のロケールで使用される具体的な名前は、引き数に B<ABMON_>{B<1>\\(enB<12>} を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。"
63286309
63296310 #. type: TP
63306311 #: build/C/man3/strftime.3:117
@@ -6338,7 +6319,7 @@ msgid ""
63386319 "The full month name according to the current locale. (Calculated from "
63396320 "I<tm_mon>.) (The specific names used in the current locale can be obtained "
63406321 "by calling B<nl_langinfo>(3) with B<MON_>{B<1>\\(enB<12>} as an argument.)"
6341-msgstr ""
6322+msgstr "現在のロケールにおける月の完全な名前。 I<tm_mon> から計算される。現在のロケールで使用される具体的な名前は、引き数に B<MON_>{B<1>\\(enB<12>} を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。"
63426323
63436324 #. type: TP
63446325 #: build/C/man3/strftime.3:127 build/C/man3/strptime.3:127
@@ -6356,7 +6337,7 @@ msgid ""
63566337 "specification, and with B<ERA_D_T_FMT> for the B<%Ec> conversion "
63576338 "specification.) (In the POSIX locale this is equivalent to B<%a %b %e %H:%M:"
63586339 "%S %Y>.)"
6359-msgstr ""
6340+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> と等価である。"
63606341
63616342 #. type: TP
63626343 #: build/C/man3/strftime.3:143 build/C/man3/strptime.3:130
@@ -6371,7 +6352,7 @@ msgid ""
63716352 "The century number (year/100) as a 2-digit integer. (SU) (The B<%EC> "
63726353 "conversion specification corresponds to the name of the era.) (Calculated "
63736354 "from I<tm_year>.)"
6374-msgstr ""
6355+msgstr "世紀に対応する 2 桁の整数 (year/1000)。 B<%EC> 変換指定は、西暦以外の年数表記 (\"era\") の名前に対応する。 I<tm_year> から計算される。 (SU)"
63756356
63766357 #. type: TP
63776358 #: build/C/man3/strftime.3:151
@@ -6381,12 +6362,10 @@ msgstr "B<%d>"
63816362
63826363 #. type: Plain text
63836364 #: build/C/man3/strftime.3:156
6384-#, fuzzy
6385-#| msgid "The day of the month as a decimal number (range 01 to 31)."
63866365 msgid ""
63876366 "The day of the month as a decimal number (range 01 to 31). (Calculated from "
63886367 "I<tm_mday>.)"
6389-msgstr "月内通算日 (10 進数表記) (01-31)。"
6368+msgstr "月内通算日 (10 進数表記) (01-31)。 I<tm_mday> から計算される。"
63906369
63916370 #. type: TP
63926371 #: build/C/man3/strftime.3:156 build/C/man3/strptime.3:136
@@ -6402,9 +6381,7 @@ msgid ""
64026381 "note that in other countries B<%d/%m/%y> is rather common. This means that "
64036382 "in international context this format is ambiguous and should not be used.) "
64046383 "(SU)"
6405-msgstr ""
6406-"B<%m/%d/%y> と等価。(うえっ、アメリカ専用だ。アメリカ以外の国では B<%d/%m/"
6407-"%y> の方が一般的だ。紛らわしいので、使用すべきではない。) (SU)"
6384+msgstr "B<%m/%d/%y> と等価。(うえっ、アメリカ専用だ。アメリカ以外の国では B<%d/%m/%y> の方が一般的だ。紛らわしいので、使用すべきではない。) (SU)"
64086385
64096386 #. type: TP
64106387 #: build/C/man3/strftime.3:166 build/C/man1/time.1:144
@@ -6414,16 +6391,10 @@ msgstr "B<%e>"
64146391
64156392 #. type: Plain text
64166393 #: build/C/man3/strftime.3:174
6417-#, fuzzy
6418-#| msgid ""
6419-#| "Like B<%d>, the day of the month as a decimal number, but a leading zero "
6420-#| "is replaced by a space. (SU)"
64216394 msgid ""
64226395 "Like B<%d>, the day of the month as a decimal number, but a leading zero is "
64236396 "replaced by a space. (SU) (Calculated from I<tm_mday>.)"
6424-msgstr ""
6425-"B<%d> と同様に月内通算日を 10 進数で表現するが、 1 桁の場合 10 の位にゼロを置"
6426-"かずスペースを置く。(SU)"
6397+msgstr "B<%d> と同様に月内通算日を 10 進数で表現するが、 1 桁の場合 10 の位にゼロを置かずスペースを置く。 I<tm_mday> から計算される。 (SU)"
64276398
64286399 #. type: TP
64296400 #: build/C/man3/strftime.3:174 build/C/man1/time.1:141
@@ -6433,10 +6404,8 @@ msgstr "B<%E>"
64336404
64346405 #. type: Plain text
64356406 #: build/C/man3/strftime.3:177
6436-#, fuzzy
6437-#| msgid "Modifier: use alternative format, see below. (SU)"
64386407 msgid "Modifier: use alternative (\"era-based\") format, see below. (SU)"
6439-msgstr "別形式を使用する際の修飾子。下記参照。 (SU)"
6408+msgstr "別形式 (西暦以外の年数表記; \"era\") を使用する際の修飾子。下記参照。 (SU)"
64406409
64416410 #. type: TP
64426411 #: build/C/man3/strftime.3:177 build/C/man3/strptime.3:361
@@ -6458,24 +6427,13 @@ msgstr "B<%G>"
64586427
64596428 #. type: Plain text
64606429 #: build/C/man3/strftime.3:196
6461-#, fuzzy
6462-#| msgid ""
6463-#| "The ISO\\ 8601 week-based year (see NOTES) with century as a decimal "
6464-#| "number. The 4-digit year corresponding to the ISO week number (see B<"
6465-#| "%V>). This has the same format and value as B<%Y>, except that if the "
6466-#| "ISO week number belongs to the previous or next year, that year is used "
6467-#| "instead. (TZ)"
64686430 msgid ""
64696431 "The ISO\\ 8601 week-based year (see NOTES) with century as a decimal "
64706432 "number. The 4-digit year corresponding to the ISO week number (see B<%V>). "
64716433 "This has the same format and value as B<%Y>, except that if the ISO week "
64726434 "number belongs to the previous or next year, that year is used instead. "
64736435 "(TZ) (Calculated from I<tm_year>, I<tm_yday>, and I<tm_wday>.)"
6474-msgstr ""
6475-"ISO\\ 8601 週単位表記の年 (week-based year; 「注意」の節を参照)。 世紀も 10 "
6476-"進数で表す。 ISO 週番号 (B<%V> を参照) に対応した 4 桁の西暦年。 これは基本的"
6477-"には B<%Y> と同じ形式だが、ISO 週数が前年や翌年になる 場合にはその年が使用さ"
6478-"れる点が異なる。(TZ)"
6436+msgstr "ISO\\ 8601 の週 (ISO\\ 8601 week) に基づく年の表示。「注意」の節を参照)。世紀も 10 進数で表す。 ISO 週番号 (B<%V> を参照) に対応した 4 桁の西暦年。 これは基本的には B<%Y> と同じ形式だが、ISO 週数が前年や翌年になる場合にはその年が使用される点が異なる。 I<tm_year>, I<tm_yday>, I<tm_wday> から計算される。 (TZ)"
64796437
64806438 #. type: TP
64816439 #: build/C/man3/strftime.3:196 build/C/man3/strptime.3:366
@@ -6485,14 +6443,10 @@ msgstr "B<%g>"
64856443
64866444 #. type: Plain text
64876445 #: build/C/man3/strftime.3:206
6488-#, fuzzy
6489-#| msgid ""
6490-#| "Like B<%G>, but without century, that is, with a 2-digit year (00-99). "
6491-#| "(TZ)"
64926446 msgid ""
64936447 "Like B<%G>, but without century, that is, with a 2-digit year (00\\(en99). "
64946448 "(TZ) (Calculated from I<tm_year>, I<tm_yday>, and I<tm_wday>.)"
6495-msgstr "B<%G> と同様。但し、世紀を含まず下 2 桁のみを表示 (00-99)。 (TZ)"
6449+msgstr "B<%G> と同様。ただし、世紀を含まず下 2 桁のみを表示 (00\\(en99)。 I<tm_year>, I<tm_yday>, I<tm_wday> から計算される。 (TZ)"
64966450
64976451 #. type: TP
64986452 #: build/C/man3/strftime.3:206
@@ -6513,12 +6467,10 @@ msgstr "B<%H>"
65136467
65146468 #. type: Plain text
65156469 #: build/C/man3/strftime.3:216
6516-#, fuzzy
6517-#| msgid "The hour as a decimal number using a 24-hour clock (range 00 to 23)."
65186470 msgid ""
65196471 "The hour as a decimal number using a 24-hour clock (range 00 to 23). "
65206472 "(Calculated from I<tm_hour>.)"
6521-msgstr "24 時間表記での時 (hour)。 (00-23)"
6473+msgstr "24 時間表記での時 (hour) (00-23)。 I<tm_hour> から計算される。"
65226474
65236475 #. type: TP
65246476 #: build/C/man3/strftime.3:216 build/C/man3/strptime.3:149
@@ -6529,12 +6481,10 @@ msgstr "B<%I>"
65296481
65306482 #. type: Plain text
65316483 #: build/C/man3/strftime.3:221
6532-#, fuzzy
6533-#| msgid "The hour as a decimal number using a 12-hour clock (range 01 to 12)."
65346484 msgid ""
65356485 "The hour as a decimal number using a 12-hour clock (range 01 to 12). "
65366486 "(Calculated from I<tm_hour>.)"
6537-msgstr "12 時間表記での時 (hour)。 (01-12)"
6487+msgstr "12 時間表記での時 (hour) (01-12)。 I<tm_hour> から計算される。"
65386488
65396489 #. type: TP
65406490 #: build/C/man3/strftime.3:221 build/C/man3/strptime.3:152
@@ -6544,12 +6494,10 @@ msgstr "B<%j>"
65446494
65456495 #. type: Plain text
65466496 #: build/C/man3/strftime.3:226
6547-#, fuzzy
6548-#| msgid "The day of the year as a decimal number (range 001 to 366)."
65496497 msgid ""
65506498 "The day of the year as a decimal number (range 001 to 366). (Calculated "
65516499 "from I<tm_yday>.)"
6552-msgstr "年の初めから通算の日数。 (001-366)"
6500+msgstr "年の初めから通算の日数 (001-366)。 I<tm_yday> から計算される。"
65536501
65546502 #. type: TP
65556503 #: build/C/man3/strftime.3:226 build/C/man1/time.1:225
@@ -6559,17 +6507,11 @@ msgstr "B<%k>"
65596507
65606508 #. type: Plain text
65616509 #: build/C/man3/strftime.3:235
6562-#, fuzzy
6563-#| msgid ""
6564-#| "The hour (24-hour clock) as a decimal number (range 0 to 23); single "
6565-#| "digits are preceded by a blank. (See also B<%H>.) (TZ)"
65666510 msgid ""
65676511 "The hour (24-hour clock) as a decimal number (range 0 to 23); single digits "
65686512 "are preceded by a blank. (See also B<%H>.) (Calculated from I<tm_hour>.) "
65696513 "(TZ)"
6570-msgstr ""
6571-"24 時間表記での時 (0-23)。 1 桁の場合には前にゼロでなくスペースが置かれる。 "
6572-"(B<%H> も参照) (TZ)"
6514+msgstr "24 時間表記での時 (0-23)。 1 桁の場合には前にゼロでなくスペースが置かれる。 B<%H> も参照。 I<tm_hour> から計算される。 (TZ)"
65736515
65746516 #. type: TP
65756517 #: build/C/man3/strftime.3:235
@@ -6579,17 +6521,11 @@ msgstr "B<%l>"
65796521
65806522 #. type: Plain text
65816523 #: build/C/man3/strftime.3:244
6582-#, fuzzy
6583-#| msgid ""
6584-#| "The hour (12-hour clock) as a decimal number (range 1 to 12); single "
6585-#| "digits are preceded by a blank. (See also B<%I>.) (TZ)"
65866524 msgid ""
65876525 "The hour (12-hour clock) as a decimal number (range 1 to 12); single digits "
65886526 "are preceded by a blank. (See also B<%I>.) (Calculated from I<tm_hour>.) "
65896527 "(TZ)"
6590-msgstr ""
6591-"12 時間表記での時 (0-12)。 1 桁の場合には前にゼロでなくスペースが置かれる。 "
6592-"(B<%I> も参照) (TZ)"
6528+msgstr "12 時間表記での時 (0-12)。 1 桁の場合には前にゼロでなくスペースが置かれる。 B<%I> も参照。 I<tm_hour> から計算される。 (TZ)"
65936529
65946530 #. type: TP
65956531 #: build/C/man3/strftime.3:244 build/C/man3/strptime.3:155
@@ -6599,11 +6535,9 @@ msgstr "B<%m>"
65996535
66006536 #. type: Plain text
66016537 #: build/C/man3/strftime.3:249
6602-#, fuzzy
6603-#| msgid "The month as a decimal number (range 01 to 12)."
66046538 msgid ""
66056539 "The month as a decimal number (range 01 to 12). (Calculated from I<tm_mon>.)"
6606-msgstr "月 (10 進数表記)。 (01-12)"
6540+msgstr "10 進数表記の月 (01-12)。 I<tm_mon> から計算される。"
66076541
66086542 #. type: TP
66096543 #: build/C/man3/strftime.3:249 build/C/man3/strptime.3:158
@@ -6614,12 +6548,10 @@ msgstr "B<%M>"
66146548
66156549 #. type: Plain text
66166550 #: build/C/man3/strftime.3:254
6617-#, fuzzy
6618-#| msgid "The minute as a decimal number (range 00 to 59)."
66196551 msgid ""
66206552 "The minute as a decimal number (range 00 to 59). (Calculated from "
66216553 "I<tm_min>.)"
6622-msgstr "分 (10 進数表記) (00-59)"
6554+msgstr "10 進数表記の分 (00-59)。 I<tm_min> から計算される。"
66236555
66246556 #. type: TP
66256557 #: build/C/man3/strftime.3:254 build/C/man3/strptime.3:161
@@ -6630,7 +6562,7 @@ msgstr "B<%n>"
66306562 #. type: Plain text
66316563 #: build/C/man3/strftime.3:257
66326564 msgid "A newline character. (SU)"
6633-msgstr "改行。 (SU)"
6565+msgstr "改行 (SU)"
66346566
66356567 #. type: TP
66366568 #: build/C/man3/strftime.3:257 build/C/man1/time.1:216
@@ -6640,10 +6572,8 @@ msgstr "B<%O>"
66406572
66416573 #. type: Plain text
66426574 #: build/C/man3/strftime.3:260
6643-#, fuzzy
6644-#| msgid "Modifier: use alternative format, see below. (SU)"
66456575 msgid "Modifier: use alternative numeric symbols, see below. (SU)"
6646-msgstr "別形式を使用する際の修飾子。下記参照。 (SU)"
6576+msgstr "別の数値シンボルを使用する際の修飾子。下記参照。 (SU)"
66476577
66486578 #. type: TP
66496579 #: build/C/man3/strftime.3:260 build/C/man3/strptime.3:164
@@ -6654,11 +6584,6 @@ msgstr "B<%p>"
66546584
66556585 #. type: Plain text
66566586 #: build/C/man3/strftime.3:273
6657-#, fuzzy
6658-#| msgid ""
6659-#| "Either \"AM\" or \"PM\" according to the given time value, or the "
6660-#| "corresponding strings for the current locale. Noon is treated as \"PM\" "
6661-#| "and midnight as \"AM\"."
66626587 msgid ""
66636588 "Either \"AM\" or \"PM\" according to the given time value, or the "
66646589 "corresponding strings for the current locale. Noon is treated as \"PM\" and "
@@ -6666,9 +6591,7 @@ msgid ""
66666591 "representations used for \"AM\" and \"PM\" in the current locale can be "
66676592 "obtained by calling B<nl_langinfo>(3) with B<AM_STR> and B<PM_STR>, "
66686593 "respectively.)"
6669-msgstr ""
6670-"現在のロケールにおける「午前」「午後」に相当する文字列。 英語の場合には \"AM"
6671-"\" または \"PM\" となる。 正午は「午後」、真夜中は「午前」として扱われる。"
6594+msgstr "現在のロケールにおける「午前」「午後」に相当する文字列。 英語の場合には \"AM\" または \"PM\" となる。 正午は「午後」、真夜中は「午前」として扱われる。 I<tm_hour> から計算される。現在のロケールで \"AM\" と \"PM\" に対応する文字列表現は、それぞれ B<AM_STR> と B<PM_STR> を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。"
66726595
66736596 #. type: TP
66746597 #: build/C/man3/strftime.3:273 build/C/man1/time.1:155
@@ -6678,16 +6601,10 @@ msgstr "B<%P>"
66786601
66796602 #. type: Plain text
66806603 #: build/C/man3/strftime.3:282
6681-#, fuzzy
6682-#| msgid ""
6683-#| "Like B<%p> but in lowercase: \"am\" or \"pm\" or a corresponding string "
6684-#| "for the current locale. (GNU)"
66856604 msgid ""
66866605 "Like B<%p> but in lowercase: \"am\" or \"pm\" or a corresponding string for "
66876606 "the current locale. (Calculated from I<tm_hour>.) (GNU)"
6688-msgstr ""
6689-"B<%p> と同様であるが小文字が使用される。 英語の場合には \"am\" や \"pm\" とな"
6690-"る。(GNU)"
6607+msgstr "B<%p> と同様であるが小文字が使用される。 \"am\" や \"pm\"、もしくは現在のロケールでの対応する文字列となる。 I<tm_hour> から計算される。 (GNU)"
66916608
66926609 #. type: TP
66936610 #: build/C/man3/strftime.3:282 build/C/man3/strptime.3:168
@@ -6703,7 +6620,7 @@ msgid ""
67036620 "current locale can be obtained by calling B<nl_langinfo>(3) with "
67046621 "B<T_FMT_AMPM> as an argument.) (In the POSIX locale this is equivalent to B<"
67056622 "%I:%M:%S %p>.)"
6706-msgstr ""
6623+msgstr "午前・午後形式での時刻。現在のロケールで使用される具体的なフォーマットは、引き数に B<T_FMT_AMPM> を指定して B<nl_langinfo>(3) を呼び出すことで取得できる。 POSIX ロケールでは B<%I:%M:%S %p> と等価である。 (SU)"
67076624
67086625 #. type: TP
67096626 #: build/C/man3/strftime.3:293 build/C/man3/strptime.3:179
@@ -6730,14 +6647,10 @@ msgstr "B<%s>"
67306647
67316648 #. type: Plain text
67326649 #: build/C/man3/strftime.3:306
6733-#, fuzzy
6734-#| msgid ""
6735-#| "The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). "
6736-#| "(TZ)"
67376650 msgid ""
67386651 "The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). "
67396652 "(TZ) (Calculated from I<mktime(tm)>.)"
6740-msgstr "紀元 (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) からの秒数。 (TZ)"
6653+msgstr "紀元 (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) からの秒数。 I<mktime(tm)> から計算される。 (TZ)"
67416654
67426655 #. type: TP
67436656 #: build/C/man3/strftime.3:306 build/C/man3/strptime.3:183
@@ -6748,16 +6661,10 @@ msgstr "B<%S>"
67486661
67496662 #. type: Plain text
67506663 #: build/C/man3/strftime.3:312
6751-#, fuzzy
6752-#| msgid ""
6753-#| "The second as a decimal number (range 00 to 60). (The range is up to 60 "
6754-#| "to allow for occasional leap seconds.)"
67556664 msgid ""
67566665 "The second as a decimal number (range 00 to 60). (The range is up to 60 to "
67576666 "allow for occasional leap seconds.) (Calculated from I<tm_sec>.)"
6758-msgstr ""
6759-"秒 (10 進数表記) (00-60) (時々ある閏秒に対応するため、値の範囲は 60 までと"
6760-"なっている)"
6667+msgstr "秒 (10 進数表記) (00-60)。時々ある閏秒に対応するため、値の範囲は 60 までとなっている。 I<tm_sec> から計算される。"
67616668
67626669 #. type: TP
67636670 #: build/C/man3/strftime.3:312 build/C/man3/strptime.3:187
@@ -6790,15 +6697,10 @@ msgstr "B<%u>"
67906697
67916698 #. type: Plain text
67926699 #: build/C/man3/strftime.3:328
6793-#, fuzzy
6794-#| msgid ""
6795-#| "The day of the week as a decimal, range 1 to 7, Monday being 1. See also "
6796-#| "B<%w>. (SU)"
67976700 msgid ""
67986701 "The day of the week as a decimal, range 1 to 7, Monday being 1. See also B<"
67996702 "%w>. (Calculated from I<tm_wday>.) (SU)"
6800-msgstr ""
6801-"週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1-7)。 B<%w> も参照。(SU)"
6703+msgstr "週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1-7)。 B<%w> も参照。 I<tm_wday> から計算される。 (SU)"
68026704
68036705 #. type: TP
68046706 #: build/C/man3/strftime.3:328 build/C/man3/strptime.3:194
@@ -6809,18 +6711,11 @@ msgstr "B<%U>"
68096711
68106712 #. type: Plain text
68116713 #: build/C/man3/strftime.3:341
6812-#, fuzzy
6813-#| msgid ""
6814-#| "The week number of the current year as a decimal number, range 00 to 53, "
6815-#| "starting with the first Sunday as the first day of week 01. See also B<"
6816-#| "%V> and B<%W>."
68176714 msgid ""
68186715 "The week number of the current year as a decimal number, range 00 to 53, "
68196716 "starting with the first Sunday as the first day of week 01. See also B<%V> "
68206717 "and B<%W>. (Calculated from I<tm_yday> and I<tm_wday>.)"
6821-msgstr ""
6822-"年の初めからの通算の週番号 (10 進数表記) (00-53)。 その年の最初の日曜日を、"
6823-"第 1 週の始まりとして計算する。 B<%V> と B<%W> も参照すること。"
6718+msgstr "年の初めからの通算の週番号 (10 進数表記) (00-53)。 その年の最初の日曜日を、第 1 週の始まりとして計算する。 B<%V> と B<%W> も参照すること。 I<tm_yday> と I<tm_wday> から計算される。"
68246719
68256720 #. type: TP
68266721 #: build/C/man3/strftime.3:341 build/C/man3/strptime.3:377
@@ -6830,20 +6725,12 @@ msgstr "B<%V>"
68306725
68316726 #. type: Plain text
68326727 #: build/C/man3/strftime.3:356
6833-#, fuzzy
6834-#| msgid ""
6835-#| "The ISO\\ 8601 week number (see NOTES) of the current year as a decimal "
6836-#| "number, range 01 to 53, where week 1 is the first week that has at least "
6837-#| "4 days in the new year. See also B<%U> and B<%W>. (SU)"
68386728 msgid ""
68396729 "The ISO\\ 8601 week number (see NOTES) of the current year as a decimal "
68406730 "number, range 01 to 53, where week 1 is the first week that has at least 4 "
68416731 "days in the new year. See also B<%U> and B<%W>. (Calculated from "
68426732 "I<tm_year>, I<tm_yday>, and I<tm_wday>.) (SU)"
6843-msgstr ""
6844-"ISO\\ 8601 形式での年の始めからの週番号 (「注意」の節を参照)。 10 進数表記"
6845-"で、01 から 53 の値となる。週番号は、 新しい年が少なくとも 4 日以上含まれる最"
6846-"初の週を 1 として計算する。 B<%U> と B<%W> も参照のこと。(SU)"
6733+msgstr "ISO\\ 8601 形式での年の始めからの週番号 (「注意」の節を参照)。 10 進数表記で、01 から 53 の値となる。週番号は、新しい年が少なくとも 4 日以上含まれる最初の週を 1 として計算する。 B<%U> と B<%W> も参照のこと。 I<tm_year>, I<tm_yday>, I<tm_wday> から計算される。 (SU)"
68476734
68486735 #. type: TP
68496736 #: build/C/man3/strftime.3:356 build/C/man3/strptime.3:198
@@ -6854,16 +6741,10 @@ msgstr "B<%w>"
68546741
68556742 #. type: Plain text
68566743 #: build/C/man3/strftime.3:363
6857-#, fuzzy
6858-#| msgid ""
6859-#| "The day of the week as a decimal, range 0 to 6, Sunday being 0. See also "
6860-#| "B<%u>."
68616744 msgid ""
68626745 "The day of the week as a decimal, range 0 to 6, Sunday being 0. See also B<"
68636746 "%u>. (Calculated from I<tm_wday>.)"
6864-msgstr ""
6865-"週の何番目の日 (10 進数表記) か。日曜日を 0 とする。(0-6)。 B<%u> も参照。"
6866-"(SU)"
6747+msgstr "週の何番目の日 (10 進数表記) か。日曜日を 0 とする。(0-6)。 B<%u> も参照。 I<tm_wday> から計算される。"
68676748
68686749 #. type: TP
68696750 #: build/C/man3/strftime.3:363 build/C/man3/strptime.3:201
@@ -6874,18 +6755,11 @@ msgstr "B<%W>"
68746755
68756756 #. type: Plain text
68766757 #: build/C/man3/strftime.3:371
6877-#, fuzzy
6878-#| msgid ""
6879-#| "The week number of the current year as a decimal number, range 00 to 53, "
6880-#| "starting with the first Sunday as the first day of week 01. See also B<"
6881-#| "%V> and B<%W>."
68826758 msgid ""
68836759 "The week number of the current year as a decimal number, range 00 to 53, "
68846760 "starting with the first Monday as the first day of week 01. (Calculated "
68856761 "from I<tm_yday> and I<tm_wday>.)"
6886-msgstr ""
6887-"年の初めからの通算の週番号 (10 進数表記) (00-53)。 その年の最初の日曜日を、"
6888-"第 1 週の始まりとして計算する。 B<%V> と B<%W> も参照すること。"
6762+msgstr "年の初めからの通算の週番号 (10 進数表記) (00-53)。 その年の最初の月曜日を、第 1 週の始まりとして計算する。 B<%V> と B<%W> も参照すること。 I<tm_yday> と I<tm_wday> から計算される。"
68896763
68906764 #. type: TP
68916765 #: build/C/man3/strftime.3:371 build/C/man3/strptime.3:205
@@ -6902,7 +6776,7 @@ msgid ""
69026776 "B<nl_langinfo>(3) with B<D_FMT> as an argument for the B<%x> conversion "
69036777 "specification, and with B<ERA_D_FMT> for the B<%Ex> conversion "
69046778 "specification.) (In the POSIX locale this is equivalent to B<%m/%d/%y>.)"
6905-msgstr ""
6779+msgstr "現在のロケールで一般的な日付表記。時刻は含まない。現在のロケールで使用される具体的なフォーマットは、 B<%x> 変換指定の場合は B<D_FMT> を、 B<%Ex> 変換指定の場合は B<ERA_D_FMT> を引き数に指定して、 B<nl_langinfo>(3) を呼び出すことで取得できる。 POSIX ロケールでは、これは B<%m/%d/%y> と等価である。"
69066780
69076781 #. type: TP
69086782 #: build/C/man3/strftime.3:387 build/C/man3/strptime.3:208
@@ -6919,7 +6793,7 @@ msgid ""
69196793 "B<nl_langinfo>(3) with B<T_FMT> as an argument for the B<%X> conversion "
69206794 "specification, and with B<ERA_T_FMT> for the B<%EX> conversion "
69216795 "specification.) (In the POSIX locale this is equivalent to B<%H:%M:%S>.)"
6922-msgstr ""
6796+msgstr "現在のロケールで一般的な時刻表記。日付は含まない。現在のロケールで使用される具体的なフォーマットは、 B<%X> 変換指定の場合は B<T_FMT> を、 B<%EX> 変換指定の場合は B<ERA_T_FMT> を引き数に指定して、 B<nl_langinfo>(3) を呼び出すことで取得できる。 POSIX ロケールでは、これは B<%H:%M:%S> と等価である。"
69236797
69246798 #. type: TP
69256799 #: build/C/man3/strftime.3:403 build/C/man3/strptime.3:211
@@ -6934,7 +6808,7 @@ msgid ""
69346808 "%Ey> conversion specification corresponds to the year since the beginning of "
69356809 "the era denoted by the B<%EC> conversion specification.) (Calculated from "
69366810 "I<tm_year>)"
6937-msgstr ""
6811+msgstr "西暦の下 2 桁 (世紀部分を含まない年) (00 から 99)。 B<%Ey> 変換指定は。 B<%EC> 変換指定で示される西暦以外の年数表記 (\"era\") における初めからの年数に対応する。 I<tm_year> から計算される。"
69386812
69396813 #. type: TP
69406814 #: build/C/man3/strftime.3:414 build/C/man3/strptime.3:217
@@ -6948,7 +6822,7 @@ msgid ""
69486822 "The year as a decimal number including the century. (The B<%EY> conversion "
69496823 "specification corresponds to the full alternative year representation.) "
69506824 "(Calculated from I<tm_year>)"
6951-msgstr ""
6825+msgstr "世紀部分を含めた 10 進表記の西暦年。 B<%EY> 変換指定は別形式の年表記の完全な表現に対応する。 I<tm_year> から計算される。"
69526826
69536827 #. type: TP
69546828 #: build/C/man3/strftime.3:422 build/C/man3/strptime.3:384
@@ -6981,7 +6855,7 @@ msgstr "B<%+>"
69816855 #: build/C/man3/strftime.3:440
69826856 msgid ""
69836857 "The date and time in B<date>(1) format. (TZ) (Not supported in glibc2.)"
6984-msgstr "B<date>(1) 形式での日時。(TZ) (glibc2 ではサポートされていない)"
6858+msgstr "B<date>(1) 形式での日時。 glibc2 ではサポートされていない。 (TZ)"
69856859
69866860 #. type: TP
69876861 #: build/C/man3/strftime.3:440 build/C/man3/strptime.3:114
@@ -6992,23 +6866,10 @@ msgstr "B<%%>"
69926866 #. type: Plain text
69936867 #: build/C/man3/strftime.3:443
69946868 msgid "A literal \\(aq%\\(aq character."
6995-msgstr "\\(aq%\\(aq 文字。"
6869+msgstr "\\(aq%\\(aq 文字"
69966870
69976871 #. type: Plain text
69986872 #: build/C/man3/strftime.3:489
6999-#, fuzzy
7000-#| msgid ""
7001-#| "Some conversion specifications can be modified by preceding the "
7002-#| "conversion specifier character by the B<E> or B<O> I<modifier> to "
7003-#| "indicate that an alternative format should be used. If the alternative "
7004-#| "format or specification does not exist for the current locale, the "
7005-#| "behavior will be as if the unmodified conversion specification were used. "
7006-#| "(SU) The Single UNIX Specification mentions B<%Ec>, B<%EC>, B<%Ex>, B<"
7007-#| "%EX>, B<%Ey>, B<%EY>, B<%Od>, B<%Oe>, B<%OH>, B<%OI>, B<%Om>, B<%OM>, B<"
7008-#| "%OS>, B<%Ou>, B<%OU>, B<%OV>, B<%Ow>, B<%OW>, B<%Oy>, where the effect of "
7009-#| "the B<O> modifier is to use alternative numeric symbols (say, roman "
7010-#| "numerals), and that of the E modifier is to use a locale-dependent "
7011-#| "alternative representation."
70126873 msgid ""
70136874 "Some conversion specifications can be modified by preceding the conversion "
70146875 "specifier character by the B<E> or B<O> I<modifier> to indicate that an "
@@ -7024,17 +6885,7 @@ msgid ""
70246885 "supplying B<ERA> as an argument to a B<nl_langinfo>(3). One example of such "
70256886 "alternative forms is the Japanese era calendar scheme in the B<ja_JP> glibc "
70266887 "locale."
7027-msgstr ""
7028-"いくつかの変換指定では、変換指定文字の前に B<E> や B<O> 「修飾子」を置くこと"
7029-"によって別書式を使用するように指定することができる。 現在のロケールにおいて別"
7030-"書式が存在しない場合には、 通常の変換指定が使用されたかのように動作する "
7031-"(SU)。 統一 UNIX 規格 (Single UNIX Specification) では B<%Ec>, B<%EC>, B<"
7032-"%Ex>, B<%EX>, B<%Ey>, B<%EY>, B<%Od>, B<%Oe>, B<%OH>, B<%OI>, B<%Om>, B<"
7033-"%OM>, B<%OS>, B<%Ou>, B<%OU>, B<%OV>, B<%Ow>, B<%OW>, B<%Oy>, について記述が"
7034-"ある。ここで B<O> 修飾子は別形式の数値 (ローマ数字とか) を指定するために使用"
7035-"する。 B<E> 修飾子はロケール依存の別表現を指定するのに使用する。 (訳注: B<E> "
7036-"修飾子は日本で使用されている「昭和」「平成」 などの元号による年表記を指定す"
7037-"る。glibc 2.2 以降でのみ有効)"
6888+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 ロケールでの日本の年号 (「昭和」「平成」など) によるカレンダー表記がある。"
70386889
70396890 #. (This behavior applies since at least libc 4.4.4;
70406891 #. very old versions of libc, such as libc 4.4.1,
@@ -7063,10 +6914,7 @@ msgid ""
70636914 "Note that the return value 0 does not necessarily indicate an error. For "
70646915 "example, in many locales B<%p> yields an empty string. An empty I<format> "
70656916 "string will likewise yield an empty string."
7066-msgstr ""
7067-"返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。 例えば、"
7068-"多くのロケールでは B<%p> は空文字列を返す。 同様に、空の I<format> 文字列は空"
7069-"文字列を返す。"
6917+msgstr "返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。例えば、多くのロケールでは B<%p> は空文字列を返す。同様に、空の I<format> 文字列は空文字列を返す。"
70706918
70716919 #. type: Plain text
70726920 #: build/C/man3/strftime.3:523
@@ -7080,7 +6928,7 @@ msgstr ""
70806928 #: build/C/man3/strftime.3:533
70816929 #, no-wrap
70826930 msgid "B<strftime>()"
7083-msgstr " B<strftime>()"
6931+msgstr "B<strftime>()"
70846932
70856933 #. FIXME strftime() is in POSIX.1-2001 and POSIX.1-2008, but the details
70866934 #. in the standards changed across versions. Investigate and
@@ -7096,13 +6944,7 @@ msgid ""
70966944 "to ANSI C; POSIX.2 describes under B<date>(1) several extensions that could "
70976945 "apply to B<strftime>() as well. The B<%F> conversion is in C99 and "
70986946 "POSIX.1-2001."
7099-msgstr ""
7100-"SVr4, C89, C99. 個々の変換が厳密にどの規格に含まれるかは、 ANSI C (印なし)、"
7101-"統一 UNIX 規格 (SU印)、Olson の timezone パッケージ (TZ印)、 glibc 独自 (GNU"
7102-"印) で示している。glibc2 では B<%+> はサポートされていないが、 いくつかの拡張"
7103-"が行われている。POSIX.1 では ANSI C のみを参照している。 POSIX.2 の "
7104-"B<date>(1) のところに記述されている幾つかの拡張は B<strftime>() にも適用で"
7105-"きるだろう。 B<%F> 変換は C99 と POSIX.1-2001 にある。"
6947+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 にある。"
71066948
71076949 #. type: Plain text
71086950 #: build/C/man3/strftime.3:562
@@ -7110,34 +6952,16 @@ msgid ""
71106952 "In SUSv2, the B<%S> specifier allowed a range of 00 to 61, to allow for the "
71116953 "theoretical possibility of a minute that included a double leap second "
71126954 "(there never has been such a minute)."
7113-msgstr ""
7114-"SUSv2 では、 B<%S> は 00 から 61 の範囲をとると規定されている。 これは、1分間"
7115-"のうち閏秒が 2つ入る可能性が理論的にはあることを 考慮してのものである (実際に"
7116-"は、このような状況はこれまで一度も 起こっていない)。"
6955+msgstr "SUSv2 では、 B<%S> は 00 から 61 の範囲をとると規定されている。 これは、1 分間のうち閏秒が 2 つ入る可能性が理論的にはあることを考慮してのものである (実際には、このような状況はこれまで一度も 起こっていない)。"
71176956
71186957 #. type: SS
71196958 #: build/C/man3/strftime.3:563
71206959 #, no-wrap
71216960 msgid "ISO 8601 week dates"
7122-msgstr "ISO\\ 8601 の週・曜日表記 (Week Dates)"
6961+msgstr "ISO\\ 8601 の暦週日付"
71236962
71246963 #. type: Plain text
71256964 #: build/C/man3/strftime.3:590
7126-#, fuzzy
7127-#| msgid ""
7128-#| "B<%G>, B<%g>, and B<%V> yield values calculated from the week-based year "
7129-#| "defined by the ISO\\ 8601 standard. In this system, weeks start on a "
7130-#| "Monday, and are numbered from 01, for the first week, up to 52 or 53, for "
7131-#| "the last week. Week 1 is the first week where four or more days fall "
7132-#| "within the new year (or, synonymously, week 01 is: the first week of the "
7133-#| "year that contains a Thursday; or, the week that has 4 January in it). "
7134-#| "When three of fewer days of the first calendar week of the new year fall "
7135-#| "within that year, then the ISO 8601 week-based system counts those days "
7136-#| "as part of week 53 of the preceding year. For example, 1 January 2010 is "
7137-#| "a Friday, meaning that just three days of that calendar week fall in "
7138-#| "2010. Thus, the ISO\\ 8601 week-based system considers these days to be "
7139-#| "part of week 53 (B<%V>) of the year 2009 (B<%G>); week 01 of ISO\\ 8601 "
7140-#| "year 2010 starts on Monday, 4 January 2010."
71416965 msgid ""
71426966 "B<%G>, B<%g>, and B<%V> yield values calculated from the week-based year "
71436967 "defined by the ISO\\ 8601 standard. In this system, weeks start on a "
@@ -7153,18 +6977,7 @@ msgid ""
71536977 "of the year 2009 (B<%G>); week 01 of ISO\\ 8601 year 2010 starts on Monday, "
71546978 "4 January 2010. Similarly, the first two days of January 2011 are "
71556979 "considered to be part of week 52 of the year 2010."
7156-msgstr ""
7157-"B<%G>, B<%g>, B<%V> は、ISO\\ 8601 標準により定義された週単位表記の年により "
7158-"計算される値を出力する。 ISO\\ 8601 標準の週単位表記では、週は月曜日から開始"
7159-"され、 週番号は、年の最初の週が 01 となり、最後の週は 52 か 53 となる。 週 "
7160-"01 は、新しい年が 4 日以上含まれる最初の週である。 言い換えると、週 01 は、そ"
7161-"の年の木曜日を含む最初の週、 つまり 1 月 4 日を含む週ということである。 新し"
7162-"い年のカレンダー上の最初の週に新しい年が 3 日以下しか含まれない場合、 ISO\\ "
7163-"8601 の週単位表記では、これらの日を前の年の週 53 の一部とみなす。 例えば、"
7164-"2010 年 1 月 1 日は金曜日であり、 その週には 2010 年の日が 3 日しか含まれな"
7165-"い。 したがって、ISO\\ 8601 の週単位表記では、これらの日は 2009 年 (B<%G>) "
7166-"の週 53 (B<%V>) の一部となる。 ISO\\ 8601 の 2010 年の週 01 は 2010 年 1 月 "
7167-"4 日の月曜日から始まる。"
6980+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 の一部とみなされる。"
71686981
71696982 #. HP-UX and Tru64 also have features like this.
71706983 #. type: Plain text
@@ -7175,17 +6988,12 @@ msgid ""
71756988 "provide similar features.) Between the \\(aq%\\(aq character and the "
71766989 "conversion specifier character, an optional I<flag> and field I<width> may "
71776990 "be specified. (These precede the B<E> or B<O> modifiers, if present.)"
7178-msgstr ""
7179-"glibc では変換指定にいくつか拡張を行っている (これらの拡張は POSIX.1-2001 に"
7180-"は規定されていないが、 他のいくつかのシステムで同様の機能が提供されている)。 "
7181-"\\(aq%\\(aq 文字と変換指定文字の間に、オプションとして I<flag> とフィールド"
7182-"の I<幅> を指定できる (これらを指定する場合には B<E> や B<O> 修飾子の前に置"
7183-"く)。"
6991+msgstr "glibc では変換指定にいくつか拡張を行っている (これらの拡張は POSIX.1-2001 には規定されていないが、 他のいくつかのシステムで同様の機能が提供されている)。 \\(aq%\\(aq 文字と変換指定文字の間に、オプションとして I<フラグ> とフィールドの I<幅> を指定できる (これらを指定する場合には B<E> や B<O> 修飾子の前に置く)。"
71846992
71856993 #. type: Plain text
71866994 #: build/C/man3/strftime.3:608
71876995 msgid "The following flag characters are permitted:"
7188-msgstr "以下のフラグ文字が使用できる:"
6996+msgstr "以下のフラグ文字が使用できる。"
71896997
71906998 #. type: TP
71916999 #: build/C/man3/strftime.3:608
@@ -7229,7 +7037,7 @@ msgstr ""
72297037 #: build/C/man3/strftime.3:620
72307038 #, no-wrap
72317039 msgid "B<\\(ha>"
7232-msgstr ""
7040+msgstr "B<\\(ha>"
72337041
72347042 #. type: Plain text
72357043 #: build/C/man3/strftime.3:623
@@ -7258,10 +7066,7 @@ msgid ""
72587066 "An optional decimal width specifier may follow the (possibly absent) flag. "
72597067 "If the natural size of the field is smaller than this width, then the result "
72607068 "string is padded (on the left) to the specified width."
7261-msgstr ""
7262-"オプションの10進数の幅指定子はフラグの後ろに置くことができる (フラグはなくて"
7263-"もよい)。フィールドの本来の大きさが指定された幅よりも 小さい場合、結果文字列"
7264-"の左側は指定された幅までパディングされる。"
7069+msgstr "オプションの 10 進数の幅指定子はフラグの後ろに置くことができる (フラグはなくてもよい)。フィールドの本来の大きさが指定された幅よりも 小さい場合、結果文字列の左側は指定された幅までパディングされる。"
72657070
72667071 #. type: Plain text
72677072 #: build/C/man3/strftime.3:651
@@ -7270,11 +7075,7 @@ msgid ""
72707075 "This makes it impossible to distinguish this error case from cases where the "
72717076 "I<format> string legitimately produces a zero-length output string. "
72727077 "POSIX.1-2001 does I<not> specify any I<errno> settings for B<strftime>()."
7273-msgstr ""
7274-"出力文字列が I<max> バイトを超えてしまう場合、 I<errno> は設定「されない」。 "
7275-"このため、このエラーを、 I<format> 文字列がきちんと処理されて長さ 0 の出力文"
7276-"字列が生成される場合を区別することができない。 POSIX.1-2001 では "
7277-"B<strftime>() で I<errno> に設定する値について一切規定して「いない」。"
7078+msgstr "出力文字列が I<max> バイトを超えてしまう場合、 I<errno> は設定「されない」。 このため、このエラーと、 I<format> 文字列がきちんと処理されて長さ 0 の出力文字列が生成される場合、を区別することができない。 POSIX.1-2001 では B<strftime>() に関して I<errno> に設定される値について一切規定して「いない」。"
72787079
72797080 #. type: Plain text
72807081 #: build/C/man3/strftime.3:666
@@ -7285,7 +7086,7 @@ msgid ""
72857086 "date and time representation. One meets all kinds of strange obfuscations "
72867087 "to circumvent this B<gcc>(1) problem. A relatively clean one is to add an "
72877088 "intermediate function"
7288-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) のこの問題を回避しようとすると、何かすっきりしない気分になるだろう。 比較的きれいな解決方法は以下のような中間関数を追加することである。"
7089+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) のこの問題を回避しようとすると、何かすっきりしない気分になるだろう。 比較的きれいな回避策は以下のような中間関数を追加することである。"
72897090
72907091 #. type: Plain text
72917092 #: build/C/man3/strftime.3:675
@@ -7347,14 +7148,14 @@ msgstr "サンプルプログラム"
73477148 #. type: Plain text
73487149 #: build/C/man3/strftime.3:705
73497150 msgid "The program below can be used to experiment with B<strftime>()."
7350-msgstr "以下のプログラムを使うと B<strftime>() の実験ができる。"
7151+msgstr "以下のプログラムを使うと B<strftime>() の実験ができる。"
73517152
73527153 #. type: Plain text
73537154 #: build/C/man3/strftime.3:709
73547155 msgid ""
73557156 "Some examples of the result string produced by the glibc implementation of "
73567157 "B<strftime>() are as follows:"
7357-msgstr "以下に、 B<strftime>() の glibc 実装が生成する結果の例をいくつか示す:"
7158+msgstr "以下に B<strftime>() の glibc 実装が生成する結果の例をいくつか示す。"
73587159
73597160 #. type: Plain text
73607161 #: build/C/man3/strftime.3:718
@@ -13474,49 +13275,12 @@ msgstr " B<adjtimex>(2), B<ntp_adjtime>(3), B<time>(7)"
1347413275 #~ msgid "B<DST_AUSTALT> /* Australian style with shift in 1986 */\n"
1347513276 #~ msgstr "B<DST_AUSTALT> /* 1986年に移行されたオーストラリア式 */\n"
1347613277
13477-#~ msgid ""
13478-#~ "The abbreviated name of the day of the week according to the current "
13479-#~ "locale."
13480-#~ msgstr "現在のロケールにおける曜日の省略名。"
13481-
13482-#~ msgid ""
13483-#~ "The full name of the day of the week according to the current locale."
13484-#~ msgstr "現在のロケールにおける曜日の完全な名前。"
13485-
1348613278 #~ msgid "The abbreviated month name according to the current locale."
1348713279 #~ msgstr "現在のロケールにおける月の省略名。"
1348813280
1348913281 #~ msgid "The full month name according to the current locale."
1349013282 #~ msgstr "現在のロケールにおける月の完全な名前。"
1349113283
13492-#~ msgid "The preferred date and time representation for the current locale."
13493-#~ msgstr "現在のロケールにおいて一般的な日付・時刻の表記。"
13494-
13495-#~ msgid "The century number (year/100) as a 2-digit integer. (SU)"
13496-#~ msgstr "世紀 (西暦年の上 2 桁)。 (SU)"
13497-
13498-#~ msgid ""
13499-#~ "The time in a.m. or p.m. notation. In the POSIX locale this is "
13500-#~ "equivalent to B<%I:%M:%S %p>. (SU)"
13501-#~ msgstr ""
13502-#~ "午前・午後形式での時刻。 POSIX ロケールでは B<%I:%M:%S %p> と等価である。"
13503-#~ "(SU)"
13504-
13505-#~ msgid ""
13506-#~ "The week number of the current year as a decimal number, range 00 to 53, "
13507-#~ "starting with the first Monday as the first day of week 01."
13508-#~ msgstr ""
13509-#~ "年の初めからの通算の週番号 (10 進数表記) (00-53)。 その年の最初の月曜日"
13510-#~ "を、第 1 週の始まりとして計算する。"
13511-
13512-#~ msgid ""
13513-#~ "The preferred date representation for the current locale without the time."
13514-#~ msgstr "現在のロケールで一般的な日付表記。時刻は含まない。"
13515-
13516-#~ msgid ""
13517-#~ "The preferred time representation for the current locale without the date."
13518-#~ msgstr "現在のロケールで一般的な時刻表記。日付は含まない。"
13519-
1352013284 #~ msgid "The year as a decimal number without a century (range 00 to 99)."
1352113285 #~ msgstr "西暦の下2桁 (世紀部分を含まない年) (00-99)。"
1352213286
--- a/manual/LDP_man-pages/release/man3/strftime.3
+++ b/manual/LDP_man-pages/release/man3/strftime.3
@@ -52,120 +52,141 @@
5252 .\" Updated 2012-05-29, Akihiro MOTOKI <amotoki@gmail.com>
5353 .\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
5454 .\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
55+.\" Updated 2021-04-13, Akihiro Motoki <amotoki@gmail.com>
5556 .\"
56-.TH STRFTIME 3 2014\-08\-19 GNU "Linux Programmer's Manual"
57+.TH STRFTIME 3 " 2020\-08\-13" GNU "Linux Programmer's Manual"
5758 .SH 名前
5859 strftime \- 日付および時刻の文字列への変換
5960 .SH 書式
6061 .nf
6162 \fB#include <time.h>\fP
62-.sp
63+.PP
6364 \fBsize_t strftime(char *\fP\fIs\fP\fB, size_t \fP\fImax\fP\fB, const char *\fP\fIformat\fP\fB,\fP
6465 \fB const struct tm *\fP\fItm\fP\fB);\fP
6566 .fi
6667 .SH 説明
6768 .\" FIXME . POSIX says: Local timezone information is used as though
6869 .\" strftime() called tzset(). But this doesn't appear to be the case
69-\fBstrftime\fP() 関数 は、要素別の時刻 \fItm\fP の内容を \fIformat\fP で指定された書式指定にしたがって変換し、 長さ
70-\fImax\fP の文字列 \fIs\fP に書き込む。
70+\fBstrftime\fP() 関数 は、要素別の時刻 \fItm\fP の内容を \fIformat\fP で指定された書式指定にしたがって変換し、長さ \fImax\fP
71+の文字列 \fIs\fP に書き込む。要素別の時刻構造体 \fItm\fP は \fI<time.h>\fP で定義されている。 \fBctime\fP(3)
72+も参照。
7173 .PP
72-書式指定はヌル終端された文字列であり、 「変換指定 (conversion specification)」と呼ばれる特別な文字列を 含まることができる。
73-各々の変換指定は \(aq%\(aq 文字で始まり、 「変換指定文字 (conversion specifier character)」と呼ばれる
74-何らか他の文字で終端される。上記以外の全ての文字列は 「通常の文字列 (ordinary character sequence)」となる。
74+書式指定はヌル終端された文字列であり、「変換指定 (conversion
75+specification)」と呼ばれる特別な文字列を含めることができる。各々の変換指定は \(aq%\(aq 文字で始まり、「変換指定文字
76+(conversion specifier character)」と呼ばれる何らか他の文字で終端される。上記以外の全ての文字列は「通常の文字列
77+(ordinary character sequence)」となる。
7578 .PP
76-(NULL バイトも含む) 通常の文字列内の文字は、 そのまま \fIformat\fP から \fIs\fP にコピーされる。
77-一方、変換指定の文字は以下のように置換される。
79+(NULL バイトも含む) 通常の文字列内の文字は、そのまま \fIformat\fP から \fIs\fP
80+にコピーされる。一方、変換指定の文字は以下のリストに示すように置換される。このリストでは、 \fItm\fP
81+構造体のフィールドが参照される場合、その情報も記載している。
7882 .TP
7983 \fB%a\fP
80-現在のロケールにおける曜日の省略名。
84+現在のロケールにおける曜日の省略名。 \fItm_wday\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
85+\fBABDAY_\fP{\fB1\fP\(en\fB7\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
8186 .TP
8287 \fB%A\fP
83-現在のロケールにおける曜日の完全な名前。
88+現在のロケールにおける曜日の完全な名前。 \fItm_wday\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
89+\fBDAY_\fP{\fB1\fP\(en\fB7\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
8490 .TP
8591 \fB%b\fP
86-現在のロケールにおける月の省略名。
92+現在のロケールにおける月の省略名。 \fItm_mon\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
93+\fBABMON_\fP{\fB1\fP\(en\fB12\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
8794 .TP
8895 \fB%B\fP
89-現在のロケールにおける月の完全な名前。
96+現在のロケールにおける月の完全な名前。 \fItm_mon\fP から計算される。現在のロケールで使用される具体的な名前は、引き数に
97+\fBMON_\fP{\fB1\fP\(en\fB12\fP} を指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
9098 .TP
9199 \fB%c\fP
92-現在のロケールにおいて一般的な日付・時刻の表記。
100+現在のロケールにおいて一般的な日付・時刻の表記。現在のロケールで使用される具体的なフォーマットは、 \fB%c\fP 変換指定の場合は \fBD_T_FMT\fP
101+を、 \fB%Ec\fP 変換指定の場合は \fBERA_D_T_FMT\fP を引き数に指定して \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
102+POSIX ロケールでは \fB%a %b %e %H:%M:%S %Y\fP と等価である。
93103 .TP
94104 \fB%C\fP
95-世紀 (西暦年の上 2 桁)。 (SU)
105+世紀に対応する 2 桁の整数 (year/1000)。 \fB%EC\fP 変換指定は、西暦以外の年数表記 ("era") の名前に対応する。
106+\fItm_year\fP から計算される。 (SU)
96107 .TP
97108 \fB%d\fP
98-月内通算日 (10 進数表記) (01\-31)。
109+月内通算日 (10 進数表記) (01\-31)。 \fItm_mday\fP から計算される。
99110 .TP
100111 \fB%D\fP
101112 \fB%m/%d/%y\fP と等価。(うえっ、アメリカ専用だ。アメリカ以外の国では \fB%d/%m/%y\fP
102113 の方が一般的だ。紛らわしいので、使用すべきではない。) (SU)
103114 .TP
104115 \fB%e\fP
105-\fB%d\fP と同様に月内通算日を 10 進数で表現するが、 1 桁の場合 10 の位にゼロを置かずスペースを置く。(SU)
116+\fB%d\fP と同様に月内通算日を 10 進数で表現するが、 1 桁の場合 10 の位にゼロを置かずスペースを置く。 \fItm_mday\fP
117+から計算される。 (SU)
106118 .TP
107119 \fB%E\fP
108-別形式を使用する際の修飾子。下記参照。 (SU)
120+別形式 (西暦以外の年数表記; "era") を使用する際の修飾子。下記参照。 (SU)
109121 .TP
110122 \fB%F\fP
111123 \fB%Y\-%m\-%d\fP と等価 (ISO\ 8601 形式の日付フォーマット)。 (C99)
112124 .TP
113125 \fB%G\fP
114-ISO\ 8601 週単位表記の年 (week\-based year; 「注意」の節を参照)。 世紀も 10 進数で表す。 ISO 週番号 (\fB%V\fP
115-を参照) に対応した 4 桁の西暦年。 これは基本的には \fB%Y\fP と同じ形式だが、ISO 週数が前年や翌年になる
116-場合にはその年が使用される点が異なる。(TZ)
126+ISO\ 8601 の週 (ISO\ 8601 week) に基づく年の表示。「注意」の節を参照)。世紀も 10 進数で表す。 ISO 週番号
127+(\fB%V\fP を参照) に対応した 4 桁の西暦年。 これは基本的には \fB%Y\fP と同じ形式だが、ISO
128+週数が前年や翌年になる場合にはその年が使用される点が異なる。 \fItm_year\fP, \fItm_yday\fP, \fItm_wday\fP から計算される。
129+(TZ)
117130 .TP
118131 \fB%g\fP
119-\fB%G\fP と同様。但し、世紀を含まず下 2 桁のみを表示 (00\-99)。 (TZ)
132+\fB%G\fP と同様。ただし、世紀を含まず下 2 桁のみを表示 (00\(en99)。 \fItm_year\fP, \fItm_yday\fP,
133+\fItm_wday\fP から計算される。 (TZ)
120134 .TP
121135 \fB%h\fP
122136 \fB%b\fP と等価 (SU)
123137 .TP
124138 \fB%H\fP
125-24 時間表記での時 (hour)。 (00\-23)
139+24 時間表記での時 (hour) (00\-23)。 \fItm_hour\fP から計算される。
126140 .TP
127141 \fB%I\fP
128-12 時間表記での時 (hour)。 (01\-12)
142+12 時間表記での時 (hour) (01\-12)。 \fItm_hour\fP から計算される。
129143 .TP
130144 \fB%j\fP
131-年の初めから通算の日数。 (001\-366)
145+年の初めから通算の日数 (001\-366)。 \fItm_yday\fP から計算される。
132146 .TP
133147 \fB%k\fP
134-24 時間表記での時 (0\-23)。 1 桁の場合には前にゼロでなくスペースが置かれる。 (\fB%H\fP も参照) (TZ)
148+24 時間表記での時 (0\-23)。 1 桁の場合には前にゼロでなくスペースが置かれる。 \fB%H\fP も参照。 \fItm_hour\fP から計算される。
149+(TZ)
135150 .TP
136151 \fB%l\fP
137-12 時間表記での時 (0\-12)。 1 桁の場合には前にゼロでなくスペースが置かれる。 (\fB%I\fP も参照) (TZ)
152+12 時間表記での時 (0\-12)。 1 桁の場合には前にゼロでなくスペースが置かれる。 \fB%I\fP も参照。 \fItm_hour\fP から計算される。
153+(TZ)
138154 .TP
139155 \fB%m\fP
140-月 (10 進数表記)。 (01\-12)
156+10 進数表記の月 (01\-12)。 \fItm_mon\fP から計算される。
141157 .TP
142158 \fB%M\fP
143-分 (10 進数表記) (00\-59)
159+10 進数表記の分 (00\-59)。 \fItm_min\fP から計算される。
144160 .TP
145161 \fB%n\fP
146-改行。 (SU)
162+改行 (SU)
147163 .TP
148164 \fB%O\fP
149-別形式を使用する際の修飾子。下記参照。 (SU)
165+別の数値シンボルを使用する際の修飾子。下記参照。 (SU)
150166 .TP
151167 \fB%p\fP
152168 現在のロケールにおける「午前」「午後」に相当する文字列。 英語の場合には "AM" または "PM" となる。
153-正午は「午後」、真夜中は「午前」として扱われる。
169+正午は「午後」、真夜中は「午前」として扱われる。 \fItm_hour\fP から計算される。現在のロケールで "AM" と "PM"
170+に対応する文字列表現は、それぞれ \fBAM_STR\fP と \fBPM_STR\fP を指定して \fBnl_langinfo\fP(3)
171+を呼び出すことで取得できる。
154172 .TP
155173 \fB%P\fP
156-\fB%p\fP と同様であるが小文字が使用される。 英語の場合には "am" や "pm" となる。(GNU)
174+\fB%p\fP と同様であるが小文字が使用される。 "am" や "pm"、もしくは現在のロケールでの対応する文字列となる。 \fItm_hour\fP
175+から計算される。 (GNU)
157176 .TP
158177 \fB%r\fP
159-午前・午後形式での時刻。 POSIX ロケールでは \fB%I:%M:%S %p\fP と等価である。(SU)
178+午前・午後形式での時刻。現在のロケールで使用される具体的なフォーマットは、引き数に \fBT_FMT_AMPM\fP を指定して
179+\fBnl_langinfo\fP(3) を呼び出すことで取得できる。 POSIX ロケールでは \fB%I:%M:%S %p\fP と等価である。 (SU)
160180 .TP
161181 \fB%R\fP
162182 24 時間表記での時刻、秒は表示しない (\fB%H:%M\fP)。 秒を含んだものは以下の \fB%T\fP を参照すること。(SU)
163183 .TP
164184 \fB%s\fP
165-紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数。 (TZ)
185+紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数。 \fImktime(tm)\fP から計算される。
186+(TZ)
166187 .TP
167188 \fB%S\fP
168-秒 (10 進数表記) (00\-60) (時々ある閏秒に対応するため、値の範囲は 60 までとなっている)
189+秒 (10 進数表記) (00\-60)。時々ある閏秒に対応するため、値の範囲は 60 までとなっている。 \fItm_sec\fP から計算される。
169190 .TP
170191 \fB%t\fP
171192 タブ文字 (SU)
@@ -174,33 +195,40 @@ ISO\ 8601 週単位表記の年 (week\-based year; 「注意」の節を参照)
174195 24 時間表記の時間 (\fB%H:%M:%S\fP) (SU)
175196 .TP
176197 \fB%u\fP
177-週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1\-7)。 \fB%w\fP も参照。(SU)
198+週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1\-7)。 \fB%w\fP も参照。 \fItm_wday\fP から計算される。 (SU)
178199 .TP
179200 \fB%U\fP
180201 年の初めからの通算の週番号 (10 進数表記) (00\-53)。 その年の最初の日曜日を、第 1 週の始まりとして計算する。 \fB%V\fP と \fB%W\fP
181-も参照すること。
202+も参照すること。 \fItm_yday\fP と \fItm_wday\fP から計算される。
182203 .TP
183204 \fB%V\fP
184-ISO\ 8601 形式での年の始めからの週番号 (「注意」の節を参照)。 10 進数表記で、01 から 53 の値となる。週番号は、
185-新しい年が少なくとも 4 日以上含まれる最初の週を 1 として計算する。 \fB%U\fP と \fB%W\fP も参照のこと。(SU)
205+ISO\ 8601 形式での年の始めからの週番号 (「注意」の節を参照)。 10 進数表記で、01 から 53
206+の値となる。週番号は、新しい年が少なくとも 4 日以上含まれる最初の週を 1 として計算する。 \fB%U\fP と \fB%W\fP も参照のこと。
207+\fItm_year\fP, \fItm_yday\fP, \fItm_wday\fP から計算される。 (SU)
186208 .TP
187209 \fB%w\fP
188-週の何番目の日 (10 進数表記) か。日曜日を 0 とする。(0\-6)。 \fB%u\fP も参照。(SU)
210+週の何番目の日 (10 進数表記) か。日曜日を 0 とする。(0\-6)。 \fB%u\fP も参照。 \fItm_wday\fP から計算される。
189211 .TP
190212 \fB%W\fP
191-年の初めからの通算の週番号 (10 進数表記) (00\-53)。 その年の最初の月曜日を、第 1 週の始まりとして計算する。
213+年の初めからの通算の週番号 (10 進数表記) (00\-53)。 その年の最初の月曜日を、第 1 週の始まりとして計算する。 \fB%V\fP と \fB%W\fP
214+も参照すること。 \fItm_yday\fP と \fItm_wday\fP から計算される。
192215 .TP
193216 \fB%x\fP
194-現在のロケールで一般的な日付表記。時刻は含まない。
217+現在のロケールで一般的な日付表記。時刻は含まない。現在のロケールで使用される具体的なフォーマットは、 \fB%x\fP 変換指定の場合は \fBD_FMT\fP
218+を、 \fB%Ex\fP 変換指定の場合は \fBERA_D_FMT\fP を引き数に指定して、 \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
219+POSIX ロケールでは、これは \fB%m/%d/%y\fP と等価である。
195220 .TP
196221 \fB%X\fP
197-現在のロケールで一般的な時刻表記。日付は含まない。
222+現在のロケールで一般的な時刻表記。日付は含まない。現在のロケールで使用される具体的なフォーマットは、 \fB%X\fP 変換指定の場合は \fBT_FMT\fP
223+を、 \fB%EX\fP 変換指定の場合は \fBERA_T_FMT\fP を引き数に指定して、 \fBnl_langinfo\fP(3) を呼び出すことで取得できる。
224+POSIX ロケールでは、これは \fB%H:%M:%S\fP と等価である。
198225 .TP
199226 \fB%y\fP
200-西暦の下2桁 (世紀部分を含まない年) (00\-99)。
227+西暦の下 2 桁 (世紀部分を含まない年) (00 から 99)。 \fB%Ey\fP 変換指定は。 \fB%EC\fP 変換指定で示される西暦以外の年数表記
228+("era") における初めからの年数に対応する。 \fItm_year\fP から計算される。
201229 .TP
202230 \fB%Y\fP
203-世紀部分を含めた ( 4 桁の) 西暦年。
231+世紀部分を含めた 10 進表記の西暦年。 \fB%EY\fP 変換指定は別形式の年表記の完全な表現に対応する。 \fItm_year\fP から計算される。
204232 .TP
205233 \fB%z\fP
206234 \fI+hhmm\fP や \fI\-hhmm\fP の形式のタイムゾーン (UTC へのオフセット時間)。(SU)
@@ -211,20 +239,20 @@ ISO\ 8601 形式での年の始めからの週番号 (「注意」の節を参
211239 \fB%+\fP
212240 .\" Nov 05 -- Not in Linux/glibc, but is in some BSDs (according to
213241 .\" their man pages)
214-\fBdate\fP(1) 形式での日時。(TZ) (glibc2 ではサポートされていない)
242+\fBdate\fP(1) 形式での日時。 glibc2 ではサポートされていない。 (TZ)
215243 .TP
216244 \fB%%\fP
217-\(aq%\(aq 文字。
245+\(aq%\(aq 文字
218246 .PP
219247 いくつかの変換指定では、変換指定文字の前に \fBE\fP や \fBO\fP 「修飾子」を置くことによって別書式を使用するように指定することができる。
220248 現在のロケールにおいて別書式が存在しない場合には、 通常の変換指定が使用されたかのように動作する (SU)。 統一 UNIX 規格 (Single
221249 UNIX Specification) では \fB%Ec\fP, \fB%EC\fP, \fB%Ex\fP, \fB%EX\fP, \fB%Ey\fP, \fB%EY\fP,
222250 \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,
223-\fB%OV\fP, \fB%Ow\fP, \fB%OW\fP, \fB%Oy\fP, について記述がある。ここで \fBO\fP 修飾子は別形式の数値 (ローマ数字とか)
224-を指定するために使用する。 \fBE\fP 修飾子はロケール依存の別表現を指定するのに使用する。 (訳注: \fBE\fP
225-修飾子は日本で使用されている「昭和」「平成」 などの元号による年表記を指定する。glibc 2.2 以降でのみ有効)
226-.PP
227-要素別の時刻構造体 \fItm\fP の詳細は \fI<time.h>\fP に定義されている。 \fBctime\fP(3) も参照すること。
251+\fB%OV\fP, \fB%Ow\fP, \fB%OW\fP, \fB%Oy\fP, について記述がある。ここで \fBO\fP 修飾子は別形式の数値シンボル (ローマ数字とか)
252+を指定するために使用する。 \fBE\fP 修飾子はロケール依存の別表現を指定するのに使用する。 \fBE\fP
253+修飾子を使った場合のデータ表現に適用されるルールは、 \fBnl_langinfo\fP(3) の引き数に \fBERA\fP
254+を指定することで取得できる。このような別表現の例としては \fBja_JP\fP glibc ロケールでの日本の年号 (「昭和」「平成」など)
255+によるカレンダー表記がある。
228256 .SH 返り値
229257 .\" (This behavior applies since at least libc 4.4.4;
230258 .\" 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
234262 終端のヌルバイトを含めた結果の文字列の長さが \fImax\fP バイトを超えなかった場合、 \fBstrftime\fP() 関数は配列 \fIs\fP
235263 に格納されたバイト数を返す (このバイト数に終端のヌルバイトは含まれない)。 終端のヌルバイトを含めた結果の文字列の長さが \fImax\fP
236264 バイトを超える場合には、 \fBstrftime\fP() は 0 を返し、配列の内容は不定となる。
237-.LP
238-返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。 例えば、多くのロケールでは \fB%p\fP は空文字列を返す。 同様に、空の
265+.PP
266+返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。例えば、多くのロケールでは \fB%p\fP は空文字列を返す。同様に、空の
239267 \fIformat\fP 文字列は空文字列を返す。
240268 .SH 環境変数
241269 環境変数 \fBTZ\fP と \fBLC_TIME\fP が使用される。 (訳注: \fBLC_ALL\fP が設定されている場合には \fBLC_TIME\fP
242270 よりもそちらが優先される。 \fBLC_TIME\fP も \fBLC_ALL\fP も設定されていない場合には \fBLANG\fP が使用される。)
271+.SH 属性
272+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
273+.TS
274+allbox;
275+lb lb lb
276+l l l.
277+インターフェース 属性 値
278+T{
279+\fBstrftime\fP()
280+T} Thread safety MT\-Safe env locale
281+.TE
243282 .SH 準拠
244-SVr4, C89, C99. 個々の変換が厳密にどの規格に含まれるかは、 ANSI C (印なし)、統一 UNIX 規格 (SU印)、Olson の
245-timezone パッケージ (TZ印)、 glibc 独自 (GNU印) で示している。glibc2 では \fB%+\fP はサポートされていないが、
246-いくつかの拡張が行われている。POSIX.1 では ANSI C のみを参照している。 POSIX.2 の \fBdate\fP(1)
247-のところに記述されている幾つかの拡張は \fBstrftime\fP() にも適用できるだろう。 \fB%F\fP 変換は C99 と POSIX.1\-2001
248-にある。
249-
250-SUSv2 では、 \fB%S\fP は 00 から 61 の範囲をとると規定されている。 これは、1分間のうち閏秒が 2つ入る可能性が理論的にはあることを
251-考慮してのものである (実際には、このような状況はこれまで一度も 起こっていない)。
283+.\" FIXME strftime() is in POSIX.1-2001 and POSIX.1-2008, but the details
284+.\" in the standards changed across versions. Investigate and
285+.\" write up.
286+SVr4, C89, C99. 個々の変換が厳密にどの規格に含まれるかをマークで示している。「マークなし」は ANSI C、「SU」は統一 UNIX
287+規格を、「TZ」は Olson の timezone パッケージ、「GNU」は glibc を示す。 glibc2 では \fB%+\fP
288+はサポートされていないが、 いくつかの拡張が行われている。POSIX.1 では ANSI C のみを参照している。 POSIX.2 の
289+\fBdate\fP(1) のところに記述されている幾つかの拡張は \fBstrftime\fP() にも適用できるだろう。 \fB%F\fP 変換は C99 と
290+POSIX.1\-2001 にある。
291+.PP
292+SUSv2 では、 \fB%S\fP は 00 から 61 の範囲をとると規定されている。 これは、1 分間のうち閏秒が 2
293+つ入る可能性が理論的にはあることを考慮してのものである (実際には、このような状況はこれまで一度も 起こっていない)。
252294 .SH 注意
253-.SS "ISO\ 8601 の週・曜日表記 (Week Dates)"
295+.SS "ISO\ 8601 の暦週日付"
254296 \fB%G\fP, \fB%g\fP, \fB%V\fP は、ISO\ 8601 標準により定義された週単位表記の年により 計算される値を出力する。 ISO\ 8601
255297 標準の週単位表記では、週は月曜日から開始され、 週番号は、年の最初の週が 01 となり、最後の週は 52 か 53 となる。 週 01 は、新しい年が
256298 4 日以上含まれる最初の週である。 言い換えると、週 01 は、その年の木曜日を含む最初の週、 つまり 1 月 4 日を含む週ということである。
257299 新しい年のカレンダー上の最初の週に新しい年が 3 日以下しか含まれない場合、 ISO\ 8601 の週単位表記では、これらの日を前の年の週 53
258300 の一部とみなす。 例えば、2010 年 1 月 1 日は金曜日であり、 その週には 2010 年の日が 3 日しか含まれない。 したがって、ISO\ 8601 の週単位表記では、これらの日は 2009 年 (\fB%G\fP) の週 53 (\fB%V\fP) の一部となる。 ISO\ 8601 の 2010
259-年の週 01 は 2010 年 1 月 4 日の月曜日から始まる。
301+年の週 01 は 2010 年 1 月 4 日の月曜日から始まる。同様に、 2011 年 1 月の最初の 2 日は 2010 年の週 52
302+の一部とみなされる。
260303 .SS "glibc での注意"
261304 .\" HP-UX and Tru64 also have features like this.
262305 glibc では変換指定にいくつか拡張を行っている (これらの拡張は POSIX.1\-2001 には規定されていないが、
263-他のいくつかのシステムで同様の機能が提供されている)。 \(aq%\(aq 文字と変換指定文字の間に、オプションとして \fIflag\fP とフィールドの
306+他のいくつかのシステムで同様の機能が提供されている)。 \(aq%\(aq 文字と変換指定文字の間に、オプションとして \fIフラグ\fP とフィールドの
264307 \fI幅\fP を指定できる (これらを指定する場合には \fBE\fP や \fBO\fP 修飾子の前に置く)。
265-
266-以下のフラグ文字が使用できる:
308+.PP
309+以下のフラグ文字が使用できる。
267310 .TP
268311 \fB_\fP
269312 (下線) 数値の結果文字列のパディング (穴埋め) をスペース (空白文字) で行う。
@@ -274,65 +317,72 @@ glibc では変換指定にいくつか拡張を行っている (これらの拡
274317 \fB0\fP
275318 変換指定文字がデフォルトではスペースでパディングを行う場合でも、 数値の結果文字列へのパディングを 0 で行う。
276319 .TP
277-\fB^\fP
320+\fB\(ha\fP
278321 結果文字列中のアルファベット文字を大文字に変換する。
279322 .TP
280323 \fB#\fP
281324 結果文字列の大文字・小文字を入れ替える (このフラグは特定の変換指定文字でしか機能しない。その中でも 本当に有用なのは \fB%Z\fP の場合だけである)。
282325 .PP
283-オプションの10進数の幅指定子はフラグの後ろに置くことができる (フラグはなくてもよい)。フィールドの本来の大きさが指定された幅よりも
326+オプションの 10 進数の幅指定子はフラグの後ろに置くことができる (フラグはなくてもよい)。フィールドの本来の大きさが指定された幅よりも
284327 小さい場合、結果文字列の左側は指定された幅までパディングされる。
285328 .SH バグ
286-出力文字列が \fImax\fP バイトを超えてしまう場合、 \fIerrno\fP は設定「されない」。 このため、このエラーを、 \fIformat\fP
287-文字列がきちんと処理されて長さ 0 の出力文字列が生成される場合を区別することができない。 POSIX.1\-2001 では \fBstrftime\fP()
288-で \fIerrno\fP に設定する値について一切規定して「いない」。
289-
329+出力文字列が \fImax\fP バイトを超えてしまう場合、 \fIerrno\fP は設定「されない」。 このため、このエラーと、 \fIformat\fP
330+文字列がきちんと処理されて長さ 0 の出力文字列が生成される場合、を区別することができない。 POSIX.1\-2001 では \fBstrftime\fP()
331+に関して \fIerrno\fP に設定される値について一切規定して「いない」。
332+.PP
290333 \fBgcc\fP(1) のいくつかのバージョンにはおかしなところがあり、 \fB%c\fP の使用法について以下のような警告を出す: \fIwarning:
291-`%c' yields only last 2 digits of year in some locales\fP
292-(\fI警告:\fPいくつかのロケールでは\fI`%c'\fPは年の下2桁しか出力しない\fI)。\fP もちろんプログラマが \fB%c\fP
293-を使うのはお薦めできることである。 \fB%c\fP を使うと適切な日付と時刻の表記を得ることができるからである。 \fBgcc\fP(1)
294-のこの問題を回避しようとすると、何かすっきりしない気分になるだろう。 比較的きれいな解決方法は以下のような中間関数を追加することである。
334+`%c\(aq yields only last 2 digits of year in some locales\fP (\fI警告:\fP
335+いくつかのロケールでは \fI`%c\(aq\fP は年の下2桁しか出力しない\fI)。\fP もちろんプログラマが \fB%c\fP を使うのはお薦めできることである。
336+\fB%c\fP を使うと適切な日付と時刻の表記を得ることができるからである。 \fBgcc\fP(1)
337+のこの問題を回避しようとすると、何かすっきりしない気分になるだろう。 比較的きれいな回避策は以下のような中間関数を追加することである。
338+.PP
295339 .in +4n
296-.nf
297-
340+.EX
298341 size_t
299342 my_strftime(char *s, size_t max, const char *fmt,
300343 const struct tm *tm)
301344 {
302345 return strftime(s, max, fmt, tm);
303346 }
304-.fi
347+.EE
305348 .in
306-
349+.PP
307350 現在では、 \fBgcc\fP(1) はこの警告を抑えるための \fI\-Wno\-format\-y2k\fP オプションを
308351 提供しており、上記の回避策はもはや必要ない。
309352 .SH 例
310353 \fBRFC\ 2822 準拠の日付形式\fP (%a と %b は英語ロケール)
311354 .PP
312-.in +2n
313-"%a,\ %d\ %b\ %Y\ %T\ %z"
355+.in +4n
356+.EX
357+ "%a,\ %d\ %b\ %Y\ %T\ %z"
358+.EE
359+.in
314360 .PP
315361 \fBRFC\ 822 準拠の日付形式\fP (%a と %b は英語ロケール)
316362 .PP
317-.in +2n
318-"%a,\ %d\ %b\ %y\ %T\ %z"
363+.in +4n
364+.EX
365+ "%a,\ %d\ %b\ %y\ %T\ %z"
366+.EE
367+.in
319368 .SS サンプルプログラム
320-以下のプログラムを使うと \fBstrftime\fP() の実験ができる。
369+以下のプログラムを使うと \fBstrftime\fP() の実験ができる。
370+.PP
371+以下に \fBstrftime\fP() の glibc 実装が生成する結果の例をいくつか示す。
321372 .PP
322-以下に、 \fBstrftime\fP() の glibc 実装が生成する結果の例をいくつか示す:
323373 .in +4n
324-.nf
325-
374+.EX
326375 $\fB ./a.out \(aq%m\(aq\fP
327376 Result string is "11"
328377 $\fB ./a.out \(aq%5m\(aq\fP
329378 Result string is "00011"
330379 $\fB ./a.out \(aq%_5m\(aq\fP
331380 Result string is " 11"
332-.fi
381+.EE
333382 .in
334383 .SS プログラムのソース
335-.nf
384+\&
385+.EX
336386 #include <time.h>
337387 #include <stdio.h>
338388 #include <stdlib.h>
@@ -359,11 +409,10 @@ main(int argc, char *argv[])
359409 printf("Result string is \e"%s\e"\en", outstr);
360410 exit(EXIT_SUCCESS);
361411 }
362-.fi
412+.EE
363413 .SH 関連項目
364-\fBdate\fP(1), \fBtime\fP(2), \fBctime\fP(3), \fBsetlocale\fP(3), \fBsprintf\fP(3),
365-\fBstrptime\fP(3)
414+ \fBdate\fP(1), \fBtime\fP(2), \fBctime\fP(3), \fBnl_langinfo\fP(3), \fBsetlocale\fP(3),
415+\fBsprintf\fP(3), \fBstrptime\fP(3)
366416 .SH この文書について
367-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
368-である。プロジェクトの説明とバグ報告に関する情報は
369-http://www.kernel.org/doc/man\-pages/ に書かれている。
417+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
418+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
--- a/manual/LDP_man-pages/stats/time
+++ b/manual/LDP_man-pages/stats/time
@@ -11,7 +11,6 @@ futimes.3,41,1,42
1111 gettimeofday.2,41,11,52
1212 nanosleep.2,40,3,43
1313 stime.2,26,3,29
14-strftime.3,121,38,159
1514 strptime.3,148,1,149
1615 time.1,105,5,110
1716 time.2,26,6,32
--- a/manual/LDP_man-pages/translation_list
+++ b/manual/LDP_man-pages/translation_list
@@ -1919,7 +1919,7 @@
19191919 ※:LDP man-pages:5.10:2019/03/06:strfromf:3:strfromd:3:
19201920 ※:LDP man-pages:5.10:2019/03/06:strfroml:3:strfromd:3:
19211921 ○:LDP man-pages:5.10:2019/03/06:strfry:3:2021/04/13::motoki@hal.t.u-tokyo.ac.jp:Akihiro Motoki:
1922-☆:LDP man-pages:3.79=>5.10:2020/08/13:strftime:3:2015/02/05::amotoki@gmail.com:Akihiro Motoki:
1922+○:LDP man-pages:5.10:2020/08/13:strftime:3:2021/06/20::amotoki@gmail.com:Akihiro Motoki:
19231923 ○:LDP man-pages:5.10:2019/03/06:string:3:2021/04/13::yoshino@civil.jcn.nihon-u.ac.jp:YOSHINO Takashi:
19241924 ○:LDP man-pages:5.10:2019/03/06:strlen:3:2021/04/13::amotoki@gmail.com:Akihiro Motoki:
19251925 @:LDP man-pages:5.10:2017/09/15:strncasecmp:3:strcasecmp:3:
--- a/manual/LDP_man-pages/untrans.html
+++ b/manual/LDP_man-pages/untrans.html
@@ -562,7 +562,6 @@
562562 <TR class="over70"><TD>gettimeofday.2</TD><TD>11/52</TD><TD>78.85</TD></TR>
563563 <TR class="over80"><TD>nanosleep.2</TD><TD>3/43</TD><TD>93.02</TD></TR>
564564 <TR class="over80"><TD>stime.2</TD><TD>3/29</TD><TD>89.66</TD></TR>
565-<TR class="over70"><TD>strftime.3</TD><TD>38/159</TD><TD>76.10</TD></TR>
566565 <TR class="over80"><TD>strptime.3</TD><TD>1/149</TD><TD>99.33</TD></TR>
567566 <TR class="over80"><TD>time.1</TD><TD>5/110</TD><TD>95.45</TD></TR>
568567 <TR class="over80"><TD>time.2</TD><TD>6/32</TD><TD>81.25</TD></TR>
@@ -636,9 +635,9 @@
636635 <TR class="title"><TD COLSPAN=3>Summary</TD></TR>
637636 <TR><TD COLSPAN=3>
638637 <UL>
639-<LI>Total uncompleted: 576
638+<LI>Total uncompleted: 575
640639 <LI>&gt;=80%: 404
641-<LI>&gt;=70%: 45
640+<LI>&gt;=70%: 44
642641 <LI>&gt;=60%: 36
643642 <LI>&lt;60%: 91
644643 </UL>