日時特殊値

日時特殊値

[1] 日時処理では、通常の日時の値の他に、「不明」「なし」「末尾・終わり」 など特別な値が使われることがあります。

[2] 情報処理では一般に処理の都合上こうした値を使う場面がよくありますが (rogue value番兵など参照)、 日時はその独特の性質に起因する要件があったり、不具合の温床になったりしています。


[79] 正確な日時が不明である時、人間向けであれば「約」や「頃」や「?」や 「○日から○日」のように日時の記述の前後で補足したり、時間間隔として記述したりします。

[80] 機械向けの場合、まで、までといった精度の低い構文を選択的に用いたり、 始点と終点の組の時間間隔として記述したりします。

[81] 正確な日時が不明であることを記述したり、推定される範囲を記述したりできる日時形式もあります。

[13] 日時の曖昧性の記述

[122] 西暦2000年問題では、00年や99年を「不明」や「なし」など特別な意味で扱っている場合の問題も指摘されました。

[5] 9/9/99 (→ ) の値によって問題が生じたとされます。 >>4, >>3


[9] #1/1/4501#

[12] Time formatting and storage bugs - Wikipedia, , https://en.wikipedia.org/wiki/Time_formatting_and_storage_bugs#Year_4501

Microsoft Outlook uses the date 1 January 4501 as a placeholder for "none" or "empty".


[7] グレゴリオ暦の「月末」を表現するために、にかかわらず月の日 31 を使うことがあります。

[6] 関連: 架空の日時

[15] February 31 - Wikimedia Commons, , https://commons.wikimedia.org/wiki/February_31

[14] List of non-standard dates - Wikipedia, , https://en.wikipedia.org/wiki/List_of_non-standard_dates


[8] Time series / date functionality — pandas 2.1.3 documentation, , http://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#nonexistent-times-when-localizing

A DST transition may also shift the local time ahead by 1 hour creating nonexistent local times (“clocks spring forward”). The behavior of localizing a timeseries with nonexistent times can be controlled by the nonexistent argument. The following options are available: