The YAML date/time format is not quite ISO8601. For one thing, it allows a space between the date and the time parts, while ISO8601 requires a "T" character (which YAML allows but discourages, aka "YUCK"). This can be technically wiggled around by saying that the space format actually contains two separate fields, each separately obeying ISO8601 (this is how http://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations
describes it, anyway).
On the other hand, the basic YAML format doesn't handle durations, specifying week numbers, ordinal day numbers, specifying only the year and the month (or only the year), etc. etc. The ISO8601 standard is enormously flexible that way.
I think that overall the YAML date/time format is a reasonable choice for a "least common denominator" format which is understood "everywhere".
It does not preclude any application from accepting the full ISO8601 standard format (e.g., an application that has deep focus on date and time such as a historical database). However, it doesn't make a lot of sense to expect all/most other applications to bother with these additional cases.
It has been several years and this is the first time I heard someone complain about making the seconds field mandatory, so I assume this isn't a widespread concern. The default time resolution of most computer programs is in seconds, anyway... If this turns out to be a common concern, we could relax the rules for the basic timestamp type, I guess, but I don't see it yet.
It is a point often lost that the basic YAML types are just that, the basic types, and applications are welcome to define additional types where it makes sense. There is no "one set of types to rule them all" - the whole implicit/explicit tagging concept was carefully thought out to enable these sort of tricks which end up allowing people to read/write very clean and readable YAML files, yet allowing the application to get exactly the data it wants.
Hope this helps,
On Tue, Oct 25, 2011 at 10:45 AM, Mike <email@example.com>
While using YAML in an application I am writing, I noticed that YAML
requires a timestamp of the form "2012-10-25 01:41:00" to include the
seconds in the string, instead of allowing timestamps like "2012-10-25
01:41". The ISO8601 format does not require that the seconds be
included, and this is confusing for users many users. It does not
appear to me to be hard to make systems that accept time stamps in
both forms, and it is different from the ISO8601 standard.
So I am curious: why is this confusing requirement in place?
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
Yaml-core mailing list