0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Open Document Format の日付時刻の取扱い

Posted at

概要

Open Document Format (ODF) は、OASIS が標準として定めた複数の XML ファイルと関連するファイルを zip で1つにまとめたオフィスファイル形式である。
ISO と IEC による ISO/IEC 26300 規格と日本の JIS X 4401 規格の基であり、
LibreOffice, Apache Open Office の標準ファイルフォーマットである。

OASIS 標準

OASIS の Open Document Format 標準には 3 つの版があり、それぞれダウンロード可能である。

第 1.2 版は以下の3 つのパートからなる。

  • OpenDocument v1.2 part 1: OpenDocument Schema
  • OpenDocument v1.2 part 2: Recalculated Formula (OpenFormula) Format
  • OpenDocument v1.2 part 3: Packages

ISO/IEC 26300

ISO/IEC 26300 も3 つのパートからなり、1.0 〜 1.2 版がある。
ISO/IEC 規格は ISO から購入できる。

JIS X 4401

日本産業規格(JIS) では 2010 年に 1.0 版を 2014 年に 1.1 版を規格化している。
日本産業標準調査会 (JISC) のJIS検索 で検索して閲覧できる。閲覧できるのは最新版のみで、ダウンロードや印刷はできない。
規格本体は日本規格協会から購入できる。

Open Document Format (Spreadsheet) の日付時刻の取扱い

OASIS 標準第 1.2 版の 18. Datetypes によれば、日付時刻関係では以下の [xmlschema-2] データ型が用いられる。

  • date
  • time
  • dateTime
  • duration

xmlschema-2 は XML Schema Part 2: Datatypes Second Edition W3C Recommendation 28 October 2004 である。
上記 4 データ型は 3.2 Primitive datatypes に含まれる。

dateTime の表記は '-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)? となっている。
タイムゾーンはオプションだが、タイムゾーン付の表記の日付時刻は UTC に変関して取り扱われる。
タイムゾーンなしの表記の場合は不特定の場所のタイムゾーンの時刻と仮定される。

date ではタイムゾーンはオプションだが、タイムゾーン付の date は 1 日の開始時刻を追跡する。

time ではタイムゾーンはオプション。

duration の表記は ISO 8601 拡張形式 PnYnMnDTnHnMnS で表される。
nY はn年、nM は nヶ月、nD は n日、T は日付時刻セパレータ、nH はn時間、nM はn分、nSはn秒。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?