Date and Time Formats

IS0 8601やW3Cで日付及び時間のフォーマットは以下のような表記方法がある。

Date and Time Formats

Different standards may need different levels of granularity in the date and time, so this profile defines six levels. Standards that reference this profile should specify one or more of these granularities. If a given standard allows more than one granularity, it should specify the meaning of the dates and times with reduced precision, for example, the result of comparing two dates with different precisions.

The formats are as follows. Exactly the components shown here must be present, with exactly this punctuation. Note that the "T" appears literally in the string, to indicate the beginning of the time element, as specified in ISO 8601.

YYYY (eg 1997)
Year and month:
YYYY-MM (eg 1997-07)
Complete date:
YYYY-MM-DD (eg 1997-07-16)
Complete date plus hours and minutes:
YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
Complete date plus hours, minutes and seconds:
YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
Complete date plus hours, minutes, seconds and a decimal fraction of a second
YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)

Date and Time Formats

アットスタイルのトップページにはこのブログのRSS(index.rdf)を取得して最新エントリーの概要を表示している。しかしIS0 8601のフォーマット(例:2007-01-17T00:47:27+09:00)となっており音声ブラウザで適切に表現できない。


<$MTEntryDate format="%Y-%m-%dT%H:%M:%S" language="en"$><$MTBlogTimezone$>


<MTEntries lastn="1">
<h3><$MTBlogName encode_html="1"$> 最新記事</h3>
<h4><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a> (<$MTEntryDate format="%x"$>)</h4>
<p><$MTEntryExcerpt$>  <a href="<$MTEntryPermalink$>" title="<$MTEntryTitle$>">続きを読む</a></p>