/
131.txt
97 lines (71 loc) · 3 KB
/
131.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
* [CODE[strftime]]
[REFS[
- [4] [CITE[Man page of STRFTIME]]
([TIME[2015-02-06 06:34:07 +09:00]] 版)
<https://linuxjm.osdn.jp/html/LDP_man-pages/man3/strftime.3.html>
]REFS]
[6]
[CITE[strptime]], [TIME[2023-11-25T07:48:54.000Z]] <https://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html>
**書式文字列の変数みたいの
[3] 今のところ、信頼できる典拠で確認したものではありません。
,%A,1*ALPHA ,曜日,Tuesday
,%a,3ALPHA ,曜日,Tue
,%B,1*ALPHA ,月 ,January
,%b,3ALPHA ,月 ,Jan
,%c, ,%a %x %X
,%D, ,%m/%d/%y
,%D,2DIGIT ,年上2桁,20
,%d,2DIGIT ,日 ,01
,%e,SP DIGIT / 2DIGIT,日, " 1"
,%H,2DIGIT ,時(24),01
,%I,2DIGIT ,時(12),01
,%j,3DIGIT ,1月1日からの日数,001
,%k,SP DIGIT / 2DIGIT,時, " 1"
,%p,'AM'/'PM',午前か午後か,AM
,%M,2DIGIT ,分 ,01
,%m,2DIGIT ,月 ,01
,%n,LF ,改行,
,%%,"%" ,パーセント,%
,%R, ,%H:%M
,%r, ,%I:%M:%S %p
,%S,2DIGIT ,秒 ,01
,%T, ,%H:%M:%S
,%t,HT ,水平タブ,
,%U,2DIGIT ,週番号 (年初日曜日=01週第1日)
,%W,2DIGIT ,週番号 (年初月曜日=01週第1日)
,%w,DIGIT ,曜日 (日曜日=0),2
,%X, ,%H:%M:%S
,%x, ,%m/%d/%y
,%Y,4DIGIT ,年 ,2002
,%y,2DIGIT ,年 ,02
,%Z,3*ALPHA ,時間帯,GMT
- [1] 信頼できる典拠って、 [[ISO]] [[C]] とかかなあ?
- [2] >>1 [[POSIX]] かも? 詳しい人解説器本ぬ
[REFS[
-
[398]
[CITE[strftime]], [TIME[2022-07-10T12:10:53.000Z]] <https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html>
- [393]
[CITE[Man page of [[STRFTIME]]]], [TIME[2022-06-24T07:08:55.000Z]], [TIME[2022-07-10T12:02:31.615Z]] <https://linuxjm.osdn.jp/html/LDP_man-pages/man3/strftime.3.html>
]REFS]
** POSIX 以外
[7] [CITE[datetime — Basic date and time types — Python 3.12.0 documentation]], [TIME[2023-11-25T06:32:46.000Z]], [TIME[2023-11-25T08:35:34.742Z]] <https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior>
[8] [[Table Schemaの日時]]
* [CODE[date]]
[5]
[CITE[date]], [TIME[2023-11-25T05:41:38.000Z]] <https://pubs.opengroup.org/onlinepubs/000095399/utilities/date.html#tag_04_33_05>
* 2桁年号
[137]
[[X/Open]] の推奨:
00〜68 → +2000, 69〜99 → +1900 を推奨しているらしいです。
[536] [CITE[date]], [TIME[2023-11-25T05:38:29.000Z]], [TIME[2023-11-25T05:38:30.007Z]] <https://pubs.opengroup.org/onlinepubs/000095399/utilities/date.html>
>[SNIP[]] If century is not specified, then values in the range [69,99] shall refer to years 1969 to 1999 inclusive, and values in the range [00,68] shall refer to years 2000 to 2068 inclusive.[SNIP[]]
>
[B[Note:]]
>
[BOX(indent)[
It is expected that in a future version of IEEE Std 1003.1-2001 the default century inferred from a 2-digit year will change. (This would apply to all commands accepting a 2-digit year as input.)
]BOX]
* 関連
[SEE[ [[暦年週年バグ]] ]]
* メモ