/
911.txt
105 lines (67 loc) · 5.39 KB
/
911.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
98
99
100
101
102
103
104
105
* 形式
[3] [[日時形式]]が色々あるように、[[日時形式]]を記述する方法も色々あります。
[66]
[FIG(list middle)[
- [[strftime]]/[[strptime]]
- [[Windowsの日付指定形式]]
- [[ISO 8601]] の[[日時書式表現]]
- [[LDML date format pattern]]
- [[XDM]] [[picture string]]
- [[Go]] [[layout string]]
- [[SSMLの日時形式パターン]]
- [[XFDLの日時形式パターン]]
- [[picture clauses]]
- [[OWPML]]
- [[TRON時間]]
- [CODE[SimpleDateFormat]]
]FIG]
* 記述能力
[6] 多くの[[日時形式パターン]]は実世界の用法の記述に十分な能力を持っていません。
- [7] 多くは「令和元 (2019) 年」のような[[紀年法]]の併記を記述できません。
- [8] 多くは同年なら月日、それ以外なら年月日、のような[[条件分岐]]を記述できません。
- [9] 多くは[[ロケール]]指定と連動しているため、日本語環境なのに[[月名]]だけ英語、
のような指定ができません。
- [10] 多くは日本の[[旧暦月名]]など、現代において標準となっていない記述方法を指定できません。
- [11] 多くは「2月11日 (旧暦正月朔日)」のような[[暦法]]の併記を記述できません。
[12] 入出力が[[平文]]なことが多いですが、
数字と単位を別の[[HTML要素]]としたい場合など、
[[マーク付け]]を扱えるべき場面もあります。
* 関連
[SEE[ [[暦年週年バグ]]
[SEE[ [[日時パターン]] ]]
* メモ
[5] [[JavaScript]] の [CODE[toLocaleString]] は、
([[ロケール]]依存である[[日時形式パターン]]を直接記述せず)
[[日時]]に含めるべき[[コンポーネント]]を指定するオプションを提供しています。
[1] [CITE[Moment.js | Docs]]
([TIME[2016-01-03 08:37:49 +09:00]] 版)
<http://momentjs.com/docs/#/parsing/string-format/>
[FIG(quote)[
[FIGCAPTION[
[2] [CITE[Moment.js | Docs]]
([TIME[2016-01-03 08:37:49 +09:00]] 版)
<http://momentjs.com/docs/#/displaying/format/>
]FIGCAPTION]
> While these date formats are very similar to LDML date formats, there are a few minor differences regarding day of month, day of year, and day of week.
]FIG]
[13] [CITE@ja[DATE_FORMAT]] ([TIME[2019-08-23 11:37:34 +09:00]]) <https://docs.oracle.com/cd/E16338_01/olap.112/b61346/dml_commands_1030.htm>
[14] [CITE@ja[SimpleDateFormat (Java Platform SE 8 )]]
([TIME[2019-09-04 19:31:37 +09:00]])
<https://docs.oracle.com/javase/jp/8/docs/api/java/text/SimpleDateFormat.html>
[15] [CITE@ja-JP[IBM Knowledge Center]]
([TIME[2019-09-05 12:11:29 +09:00]])
<https://www.ibm.com/support/knowledgecenter/ja/SSLTBW_2.2.0/com.ibm.zos.v2r2.ceea300/clcdat1.htm#clcdat1__pichar>
[16] [CITE[寺院ソフト『DB住職』サポート7 元号・旧暦関数?]], [TIME[2004-12-02T09:57:43.000Z]], [TIME[2020-09-21T04:00:38.181Z]] <http://www.jiin.or.jp/yama/yama7.htm>
[17] [CITE@ja[DBPro機能ガイド:書式]], [TIME[2001-06-03T11:23:54.000Z]], [TIME[2020-09-21T04:01:10.600Z]] <http://www.softvision.co.jp/dbpro/help/guide/format.htm#date>
[18] [CITE@en[String + Format · Day.js]], [TIME[2020-12-29T03:12:03.000Z]], [TIME[2020-12-31T05:58:58.215Z]] <https://day.js.org/docs/en/parse/string-format>
[19] [CITE@en[Format · Day.js]], [TIME[2020-12-29T03:12:03.000Z]], [TIME[2020-12-31T06:02:58.974Z]] <https://day.js.org/docs/en/display/format>
[20] [CITE@en[AdvancedFormat · Day.js]], [TIME[2020-12-29T03:12:03.000Z]], [TIME[2020-12-31T06:05:54.952Z]] <https://day.js.org/docs/en/plugin/advanced-format>
[21] [CITE[Manual | Luxon]], [TIME[2020-08-23T03:12:23.000Z]], [TIME[2020-12-31T06:16:17.925Z]] <https://moment.github.io/luxon/docs/manual/formatting.html>
[22] [CITE[Manual | Luxon]], [TIME[2020-08-23T03:12:23.000Z]], [TIME[2020-12-31T06:16:56.214Z]] <https://moment.github.io/luxon/docs/manual/parsing.html#table-of-tokens>
[23] [CITE@ja[書式 - TClock Lightのヘルプ]], [TIME[2021-07-05T05:33:38.000Z]] <http://tclock2ch.no.land.to/kazubon/tclocklight/help/ja/format.html>
[24] [CITE@ja[日付]], [[JasmineSoft]], [TIME[2022-04-21T04:38:01.000Z]], [TIME[2022-04-22T09:49:13.853Z]] <https://wagby.com/manual9/modelitem-date.html>
[25] [CITE[OpenVMS Programming Concepts Manual]], [TIME[2006-01-07T09:09:00.000Z]], [TIME[2022-05-03T05:03:44.000Z]] <http://odl.sysworks.biz/disk$vaxdocdec022/opsys/vmsos73/vmsos73/5841/5841pro_074.html>
[4] [CITE@ja[日付/時刻→文字列変換ライブラリ - FIELD NOTES: 書を持って街へ出よう]], [TIME[2022-07-31T07:12:35.000Z]] <https://field-notes.hatenablog.jp/entry/20100925/1285386150>
[26] [CITE[3.5 文章付箋セグメント]], [TIME[2011-01-26T00:45:18.000Z]], [TIME[2022-08-25T15:02:41.828Z]] <http://www.chokanji.com/developer/doc/btron3/shared_data/tad2.html#adz>
- [27] [CITE@en[Better time format in completion - GoLand Guide]], [TIME[2022-08-24T14:18:10.000Z]], [TIME[2022-09-01T03:52:16.694Z]] <https://www.jetbrains.com/go/guide/tips/better-time-format-completion/?playlist=new-features-in-goland-2020-3>
--[28] [CITE@ja[高級文鎮 𝐑𝐓𝟔𝟔𝟎𝟎𝐚𝐱さんはTwitterを使っています: 「Goland の日付フォーマットの入力補完賢すぎてびっくりしてる https://t.co/Ot0bxw0v84」 / Twitter]], 午後2:45 · 2022年8月31日 [TZ[+09:00]], [TIME[2022-09-01T03:51:50.000Z]] <https://twitter.com/mpyw/status/1564851848288210945>