Skip to content

Commit

Permalink
deploy: 7830b15
Browse files Browse the repository at this point in the history
  • Loading branch information
ePaul committed May 6, 2024
1 parent d462017 commit 193cf53
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
26 changes: 25 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,7 @@ <h2 id="_zalando_restful_api_and_event_guidelines"><a class="link" href="#_zalan
<li><a href="#238"><span class="must-keyword"><strong>MUST</strong></span> use standard data formats</a></li>
<li><a href="#171"><span class="must-keyword"><strong>MUST</strong></span> define a format for number and integer types</a></li>
<li><a href="#169"><span class="must-keyword"><strong>MUST</strong></span> use standard formats for date and time properties</a></li>
<li><a href="#255"><span class="should-keyword"><strong>SHOULD</strong></span> select appropriate one of date or date-time format</a></li>
<li><a href="#127"><span class="should-keyword"><strong>SHOULD</strong></span> use standard formats for time duration and interval properties</a></li>
<li><a href="#170"><span class="must-keyword"><strong>MUST</strong></span> use standard formats for country, language and currency properties</a></li>
<li><a href="#244"><span class="should-keyword"><strong>SHOULD</strong></span> use content negotiation, if clients may choose from different resource representations</a></li>
Expand Down Expand Up @@ -3001,6 +3002,29 @@ <h3 id="169"><a class="link" href="#169"><span class="must-keyword"><strong>MUST
</div>
</div>
<div class="sect2">
<h3 id="255"><a class="link" href="#255"><span class="should-keyword"><strong>SHOULD</strong></span> select appropriate one of date or date-time format</a></h3>
<div class="paragraph">
<p>When choosing between <code>date</code> and <code>datetime</code> formats you should take into account the following:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>date</code> should be used for properties where no exact point in time is required and day time-range is sufficient,
for instance, document dates, birthdays, ETAs (estimated time of arrival).
Without further context, <code>date</code> implies the time period from midnight to midnight in the local time zone.
However, the timezone information can be also provided
as an additional context information via other fields indicating location.</p>
</li>
<li>
<p><code>datetime</code> should be used in all other cases where an exact point in time is required,
for instance, datetimes for supplier advice, specific processing events, fast delivery planning dates.
As required in <a href="#169"><span class="must-keyword"><strong>MUST</strong></span> use standard formats for date and time properties</a>, <code>datetime</code> requires the explicit time zone offset to be provided,
which avoids misinterpretations and eliminates the need of an additional context to provide.</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="127"><a class="link" href="#127"><span class="should-keyword"><strong>SHOULD</strong></span> use standard formats for time duration and interval properties</a></h3>
<div class="paragraph">
<p>Properties and that are by design durations and time intervals should be
Expand Down Expand Up @@ -10971,7 +10995,7 @@ <h3 id="rule-changes"><a class="link" href="#rule-changes">Rule Changes</a></h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-04-16 12:39:45 UTC
Last updated 2024-05-06 09:26:02 UTC
</div>
</div>
</body>
Expand Down
4 changes: 4 additions & 0 deletions rules
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@
{
"id": "#254",
"title": "SHOULD avoid a total result count"
},
{
"id": "#255",
"title": "SHOULD select appropriate one of date or date-time format"
}
]
}
4 changes: 4 additions & 0 deletions rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@
{
"id": "#254",
"title": "SHOULD avoid a total result count"
},
{
"id": "#255",
"title": "SHOULD select appropriate one of date or date-time format"
}
]
}

0 comments on commit 193cf53

Please sign in to comment.