Jump to content

Talk:ISO 8601: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
Line 73: Line 73:


I might be missing something, but surely 2003-02-15/P2M -> 2003-04-15. Where does 2004-03-15 come from? (which is 13 months ahead) Likewise for the 2nd statement
I might be missing something, but surely 2003-02-15/P2M -> 2003-04-15. Where does 2004-03-15 come from? (which is 13 months ahead) Likewise for the 2nd statement

== When the day of the month is omitted ==

When the day of the month is omitted the only format is allowed is YYYY-MM, but YYYY-MM can sometimes be confused by a range of years, but using YYYY-MM-- actually would be the best way to write it


A single date (1906 August 4)

Basic format: 19060804<br>
Extended format: 1906-08-04


Well writing 190608 could mean 1906 August or 2019 June 8 or even (1919 June 8)

1906-08 could mean 1906 August or even it can be a timespan expanding from 1906 to 1908, so writing a format like 1906-08-- is the most appropriate way to write the date


ISO 8601:2000 permitted to write the format in <code>--MM-DD</code>, because writing it in <code>MM-DD</code> could mean a lot of things it could be confused with <code>DD-MM</code>, <code>MM-YY</code> or even <code>YY-MM</code> or a range of years [[Special:Contributions/98.31.29.4|98.31.29.4]] ([[User talk:98.31.29.4|talk]]) 21:14, 29 July 2022 (UTC)

Revision as of 21:14, 29 July 2022

WikiProject iconTime B‑class Top‑importance
WikiProject iconThis article is within the scope of WikiProject Time, a collaborative effort to improve the coverage of Time on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
BThis article has been rated as B-class on Wikipedia's content assessment scale.
TopThis article has been rated as Top-importance on the project's importance scale.

Wikipedia dates

Some people have proposed using ISO 8601 for Wikipedia dates. For more of this discussion, see Wikipedia talk:Manual of Style (dates and numbers).

-- (unsigned) 2003-03-01T12:06:42‎ MartinHarper

It appears that it's rapidly becoming a de facto standard (if not yet de jure) at least for dates in Wikipedia citations.
-- (unsigned) 2014-02-11T22:05:46‎ 67.52.192.26

Standard Date

You can use quite a couple templates, in the YYYY-MM-DD date format


{{date|2=ISO}} or {{ISO date}} could be used. — Preceding unsigned comment added by 98.31.29.4 (talkcontribs) 00:47, 10 November 2018 UTC (UTC)

Would it be useful to define what a day/month/year consist of?

I was reading this line in Durations :

Thus, "PT36H" could be used as well as "P1DT12H" for representing the same duration. But keep in mind that "PT36H" is not the same as "P1DT12H" when switching from or to Daylight saving time.

And thought "Surely a day is defined as 24 hours and 12 hours is 12 hours, so why would changing daylight savings matter?"

But presumably a day is defined like "the next occasion when the time is greater than current time" ? Meaning 1 day per year is 23 hours long and one is 25.

And then considered months/years, month is the next occasion when the day is the greater (or month number more than 1 different), and a year the next occasion where the month+day are greater.

Seems like it would be useful information to be added to the page. (probably needs to be worded better than that and not just a guess!)

I just added some discussion that durations are calendar days, months, and years. In the context of intervals, this is well defined. But a "pure" duration with years or months is ambiguous regarding the amount of time in such a "pure" duration. --netjeff (talk) 21:12, 1 April 2022 (UTC)[reply]
I think if you are at 6pm on the eve of daylight savings, and add 1D, you end up at 6pm the next day.
Whereas if you add 24H, you end up at either 5pm or 7pm (depending on whether the clocks go forwards or backwards) 77.119.223.171 (talk) 22:59, 27 April 2022 (UTC)[reply]

Can date have time zone info?

I see no example of date with time zone, eg. 2020-11-08Z or 2020-11-08+01:00 (this implies a date has a time of 00:00). Not sure if this is legal in ISO 8601? I know DateTime\DateTimeOffset in .NET will successfully parse it thou, and I get tons of hits on Google "yyyy-MM-ddZ". This seems to be a weakness in the standard, I think it should have been specifically disallowed if not legal. — Preceding unsigned comment added by 148.252.106.136 (talk) 23:03, 8 November 2020 (UTC)[reply]

It could be useful to have info about this in the main article. — Preceding unsigned comment added by Osexpert (talkcontribs) 15:11, 8 November 2020 (UTC)[reply]
At least at the time of writing this, the article does have a second-level section titled "Time zone designators", which has many examples of the kind you wished for. Teemu Leisti (talk) 14:01, 31 December 2020 (UTC)[reply]
Teemu Leisti, I think you missed the point of the original post. Does ISO 8601 allow a representation like 2020-11-08+01:00 which has no indication of the time of day? For example, if I read a newspaper article that said an event occurred 11 November 2020 in Paris, France, without giving the time of day, I could represent it as 2020-11-08+01:00, if that is a valid representation. Jc3s5h (talk) 14:39, 31 December 2020 (UTC)[reply]
You're right, I didn't read the question carefully enough and missed the point. I googled a bit, and found this question [1] in Stack Overflow. The consensus of the answers is that the standard does not allow for adding a timezone to a date without a time component. Teemu Leisti (talk) 15:19, 31 December 2020 (UTC)[reply]

Are the Period gaps correct

interval 2003-02-15T00:00:00Z/P2M ends two calendar months later at 2004-03-15T00:00:00Z which is 59 days later

interval 2003-07-15T00:00:00Z/P2M ends two calendar months later at 2004-03-15T00:00:00Z which is 62 days later


Is this really correct?

I might be missing something, but surely 2003-02-15/P2M -> 2003-04-15. Where does 2004-03-15 come from? (which is 13 months ahead) Likewise for the 2nd statement

When the day of the month is omitted

When the day of the month is omitted the only format is allowed is YYYY-MM, but YYYY-MM can sometimes be confused by a range of years, but using YYYY-MM-- actually would be the best way to write it


A single date (1906 August 4)

Basic format: 19060804
Extended format: 1906-08-04


Well writing 190608 could mean 1906 August or 2019 June 8 or even (1919 June 8)

1906-08 could mean 1906 August or even it can be a timespan expanding from 1906 to 1908, so writing a format like 1906-08-- is the most appropriate way to write the date


ISO 8601:2000 permitted to write the format in --MM-DD, because writing it in MM-DD could mean a lot of things it could be confused with DD-MM, MM-YY or even YY-MM or a range of years 98.31.29.4 (talk) 21:14, 29 July 2022 (UTC)[reply]