* [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[estrftime]]

[10] 
[DFN[[CODE[estrftime]]]]
は、
[CITE[Libeth]]
が実装している[[エチオピア暦]]対応の拡張です。

[9] [CITE[Calender Handling in Libeth 0.40]], [TIME[2001-07-17T15:04:22.000Z]], [TIME[2025-08-27T08:50:38.413Z]] <https://libeth.sourceforge.net/0.40/Dates.html>

[11] 
文脈: [CODE[LIVEGEEZ]]

* [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[ [[暦年週年バグ]] ]]

* メモ

