Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Does ISO8601 require a separator in the time if one is used in the date?

by Eily (Monsignor)
on Mar 01, 2018 at 16:46 UTC ( [id://1210162]=note: print w/replies, xml ) Need Help??


in reply to Does ISO8601 require a separator in the time if one is used in the date?

From Wikipedia:

Either basic or extended formats may be used, but both date and time must use the same format.
(Basic format meaning without separators). There's no citation to go with it though.

  • Comment on Re: Does ISO8601 require a separator in the time if one is used in the date?

Replies are listed 'Best First'.
Re^2: Does ISO8601 require a separator in the time if one is used in the date?
by ikegami (Patriarch) on Mar 01, 2018 at 18:29 UTC

    On the other hand, DateTime::Format::ISO8601 does have a citation: Section 5.4 of ISO 8601:2000(E).

        Well that doc has (4.3.3), which only applies to incomplete dates (eg: no seconds):

        the expression shall either be completely in basic format, in which case the minimum number of separators necessary for the required expression is used, or completely in extended format, in which case additional separators shall be used in accordance with 4.1 and 4.2.
        4.4.4.1 also has:
        provided that the resulting expression is either consistently in basic format or consistently in extended format
        but that's for an interval, so it's mostly about having the format for the start and end (although the chosen phrasing also means consistent format within the dates). Same in 4.4.4.3 for start + duration and 4.4.4.4 for duration + end. And there's 4.4.5 which is the same as 4.3.3 for duration rather than single dates.

Re^2: Does ISO8601 require a separator in the time if one is used in the date?
by 1nickt (Canon) on Mar 01, 2018 at 16:55 UTC

    Thanks Eily. I had seen that, but frankly I'd rank DateTime modules above Wikipedia as an authority. I'm hoping someone can point to the spec, although I've looked at that in various places as well.


    The way forward always starts with a minimal test.
      I'd rank DateTime modules above Wikipedia as an authority

      Well in this case they agree anyway :) . But I guess nothing beats a direct citation from the spec.

      I can't even find a single RFC that refers to this forced condition. Now I've started, I'm curious to find something myself here if possible...

        Why would you be looking at RFC for an ISO standard?

        The web standard that most closely resembles ISO-8601 is RFC3339, and it's far, far less flexible. It always required the ":" (among other things).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1210162]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found