# ISO周日期

ISO周日期是由国际标准ISO 8601所定义的以周为基础的日期体系，其中日期由周编号年、1至52或53的周数以及1（星期一）至7（星期日）的星期几数字来表示。它与人们更为熟悉的格里高利历日期并行使用，而在日历年交替前后的某些日子里，两者对某一天属于哪一年会存在分歧。<sup>[1](https://webspace.science.uu.nl/~gent0113/calendar/isocalendar_text_3.htm)</sup><sup> • </sup><sup>[2](https://www.brepols.com/Data/Downloads/ISO8601_RULE_FOR_DEFINING_WEEKNUMBERS.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 记法 | 写作年-W周数-日，例如1995-W03-6，表示1995周编号年的第3周第6天（星期六）<sup>[2](https://www.brepols.com/Data/Downloads/ISO8601_RULE_FOR_DEFINING_WEEKNUMBERS.pdf)</sup> |
| 第1周规则 | 一年的第一个日历周是包含该年第一个星期四的那一周，等价于包含1月4日的那一周<sup>[1](https://webspace.science.uu.nl/~gent0113/calendar/isocalendar_text_3.htm)</sup> |
| 周的结构 | 每周从星期一到星期日；一个周编号年有52或53个完整的周，即364或371天<sup>[3](https://developer.apple.com/documentation/foundation/nsdatecomponents/yearforweekofyear?language=objc)</sup> |
| 长年 | 每400个周编号年中有71个拥有53周（17.75%）；其余329个（82.25%）拥有52周<sup>[1](https://webspace.science.uu.nl/~gent0113/calendar/isocalendar_text_3.htm)</sup> |
| 年份归属 | 一周归属于其星期四所在的ISO年；ISO年的最后一周总是包含12月28日<sup>[4](https://www.toolfoundry.app/guides/working-with-dates-guide)</sup><sup> • </sup><sup>[1](https://webspace.science.uu.nl/~gent0113/calendar/isocalendar_text_3.htm)</sup> |
| 53周判定 | 若1月1日是星期四，或1月1日是闰年（能被400整除，或能被4整除但不能被100整除）中的星期三，则该周编号年有53周<sup>[5](https://www.w3.org/TR/2021/SPSD-html51-20210128/infrastructure.html)</sup> |
| 现行标准 | 周日期定义于ISO 8601-1:2019，即该标准的现行版本<sup>[6](https://www.iso.org/standard/70907.html)</sup> |

## 定义与记法

根据ISO 8601，一个周编号年由52或53个完整的周——即364或371天——组成，其开篇之周是包含该年第一个星期四的那一周。<sup>[3](https://developer.apple.com/documentation/foundation/nsdatecomponents/yearforweekofyear?language=objc)</sup> 该标准的注3指出，此规则等价于说第一个日历周是包含1月4日的那一周。<sup>[1](https://webspace.science.uu.nl/~gent0113/calendar/isocalendar_text_3.htm)</sup> 由此可知，ISO日历年的最后一周总是包含12月28日。<sup>[1](https://webspace.science.uu.nl/~gent0113/calendar/isocalendar_text_3.htm)</sup>

周日期写作四位数的周编号年、字母W、两位数的周数以及一位星期几数字：1995-W03-6即1995年第3周的星期六。<sup>[2](https://www.brepols.com/Data/Downloads/ISO8601_RULE_FOR_DEFINING_WEEKNUMBERS.pdf)</sup> 星期几从星期一开始以1至7编号。<sup>[2](https://www.brepols.com/Data/Downloads/ISO8601_RULE_FOR_DEFINING_WEEKNUMBERS.pdf)</sup>

## 周编号年与日历年为何不同

格里高利历有365天，闰年则为366天，两者都不能被7天的周整除，因此日历年的最后一周常常延伸至下一年，而一年的第一周也常常始于上一年。<sup>[3](https://developer.apple.com/documentation/foundation/nsdatecomponents/yearforweekofyear?language=objc)</sup> ISO周日期通过将每一周完整地归属于某一个周编号年来解决这一问题：一周归属于其星期四所在的年份。<sup>[4](https://www.toolfoundry.app/guides/working-with-dates-guide)</sup>

其结果是，1月1日前后的日子可能带有不同的周编号年。标准本身给出的例子是：1995年1月1日星期日，其日历日期为1995-01-01，但周日期为1994-W52-7。<sup>[7](https://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_iso_wd_8601-1_2016-02-16.pdf)</sup> 反方向上，仍在12月的日期可能已经属于下一个ISO年；例如，2029年12月下旬的日子落在2030年的第1周。<sup>[4](https://www.toolfoundry.app/guides/working-with-dates-guide)</sup> 第1周、第52周和第53周恰恰是可能跨越两个日历年的周。<sup>[8](https://sroczynski.pl/download/calendar26.pdf)</sup>

## 长年与短年

由于52周是364天，比日历年少一两天，剩余的日子逐渐积累，偶尔便产生出第53周。<sup>[9](https://us.datedb.net/almanac/iso-date-and-week/)</sup> 格里高利历中的星期几以精确的400年周期循环，该周期包含146,097天，恰好是20,871周。在该周期内计数，得到71个长（53周）ISO年和329个短（52周）年，因此17.75%的年份为长年。<sup>[1](https://webspace.science.uu.nl/~gent0113/calendar/isocalendar_text_3.htm)</sup> 同样的计数也可由算术得出：71 × 53 + 329 × 52 = 20,871周。<sup>[10](https://oeis.org/A249404)</sup>

HTML标准以日历年第一天来表述同样的判定：若对应的格里高利年始于星期四，或始于星期三且为闰年——闰年即能被400整除，或能被4整除但不能被100整除的年份——则该周编号年有53周。<sup>[5](https://www.w3.org/TR/2021/SPSD-html51-20210128/infrastructure.html)</sup> 长年并不罕见，但也并不规律。<sup>[9](https://us.datedb.net/almanac/iso-date-and-week/)</sup> ISO 8601标准本身并未给出确定哪些年份为长年的简单算法；它只陈述了第一个星期四规则。<sup>[1](https://webspace.science.uu.nl/~gent0113/calendar/isocalendar_text_3.htm)</sup>

## 历史

周编号最早于1971年作为ISO推荐标准出现，1976年成为标准ISO 2015《周的编号》，并在ISO 8601于1988年6月发布时并入该标准。<sup>[11](https://worldtimedata.com/productivity/what-week-number-is-it-iso-week-numbers-vs-us-week-numbers/)</sup> 1976年的一份较早的ISO 2015文件已经指定了一周开始的那一天，并定义了一年的第一周。<sup>[12](https://standards.globalspec.com/std/1754639/iso-2015)</sup> 现行版本ISO 8601-1:2019延续了周日期定义。<sup>[6](https://www.iso.org/standard/70907.html)</sup>

HTML规范将该体系锚定在一个固定纪元上：从1969年12月29日星期一开始的七天时段被定义为1970周编号年的第1周。<sup>[5](https://www.w3.org/TR/2021/SPSD-html51-20210128/infrastructure.html)</sup>

## 与其他周编号体系的比较

一个给定的周数由两项决定所确定：每周开始的那一天，以及被指定为第1周的那一周。<sup>[11](https://worldtimedata.com/productivity/what-week-number-is-it-iso-week-numbers-vs-us-week-numbers/)</sup> 53周年份现象并非ISO 8601所独有；它出现在任何基于格里高利历、要求完整七天周的周编号体系中，而美国的惯例则截短一年的第一周和最后一周以相适应。<sup>[14](https://tammergard.se/blog/calendar-maths)</sup><sup> • </sup><sup>[18](https://www.timeanddate.com/date/week-numbers.html)</sup>

差异在新年前后显现出来。按美国方式计算周数时，包含2027年1月1日的那一周始于2026年12月27日星期日，止于2027年1月2日星期六；因此，设置为美国区域并采用周基础年的格式化程序对2026年12月27日至31日输出2027，而基于ISO的格式化程序则输出2026。<sup>[11](https://worldtimedata.com/productivity/what-week-number-is-it-iso-week-numbers-vs-us-week-numbers/)</sup> Excel的`WEEKNUM(date, 2)`从星期一开始计算周，但仍从1月1日起算第1周，这既不符合两种体系中的任何一种，也在新年前后与ISO不同。<sup>[13](https://cornertools.com/week-number)</sup>

## 软件支持与陷阱

编程平台通过专门的字段来提供周日期，因为周编号年必须与日历年分开保存。Python的`date.isocalendar()`返回ISO年、周数和星期几，而`date.fromisocalendar(year, week, day)`则映射回格里高利历日期。<sup>[15](https://docs.python.org/3/library/datetime.html?highlight=datetime+strptime)</sup> .NET提供`ISOWeek`类，其`GetYear`方法计算格里高利历日期对应的ISO周编号年，其转换方法则将ISO年、周数和星期几映射回格里高利历日期。<sup>[16](https://learn.microsoft.com/en-us/dotnet/api/system.globalization.isoweek?view=netstandard-2.1)</sup> 苹果的Foundation框架将`weekOfYear`（指示日期落在哪一周）与`yearForWeekOfYear`（提供对应的周编号年）配对使用。<sup>[3](https://developer.apple.com/documentation/foundation/nsdatecomponents/yearforweekofyear?language=objc)</sup>

常见的故障模式是混用两个年份字段。在Java和Unicode风格的日期模式中，大写`YYYY`表示周基础年，小写`yyyy`表示日历年；用错一个就会在新年前后产生错误的年份。<sup>[11](https://worldtimedata.com/productivity/what-week-number-is-it-iso-week-numbers-vs-us-week-numbers/)</sup> Unicode CLDR文档给出了同样的指引：当周数字段与年份一起使用时，必须使用周基础年符号'Y'而非'y'。<sup>[17](https://github.com/unicode-org/cldr/blob/main/docs/ldml/tr35-dates.md)</sup> 假定每年都有52周的代码通常不会报错，而是静默地丢弃一周，因为每400年中约有71年有53周。<sup>[4](https://www.toolfoundry.app/guides/working-with-dates-guide)</sup>

由于周编号体系各不相同，同一日期在不同应用程序中可能显示不同的周数；一周第一天和第一周最少天数的区域设置决定结果，而ISO 8601对应的是以星期一为第一天、最少4天。<sup>[17](https://github.com/unicode-org/cldr/blob/main/docs/ldml/tr35-dates.md)</sup>

## References

1. [The Mathematics of the ISO 8601 Calendar – Long and Short Years, R. H. Gent](https://webspace.science.uu.nl/~gent0113/calendar/isocalendar_text_3.htm)
2. [ISO 8601 rule for defining week numbers, Brepols](https://www.brepols.com/Data/Downloads/ISO8601_RULE_FOR_DEFINING_WEEKNUMBERS.pdf)
3. [yearForWeekOfYear, Apple Developer Documentation](https://developer.apple.com/documentation/foundation/nsdatecomponents/yearforweekofyear?language=objc)
4. [Working with Dates, Weeks and Deadlines, ToolFoundry](https://www.toolfoundry.app/guides/working-with-dates-guide)
5. [HTML 5.1 2nd Edition: 2. Common infrastructure, W3C](https://www.w3.org/TR/2021/SPSD-html51-20210128/infrastructure.html)
6. [ISO 8601-1:2019, ISO](https://www.iso.org/standard/70907.html)
7. [ISO/TC 154 WG 5 N0038, ISO WD 8601-1 (2016 draft), Library of Congress](https://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_iso_wd_8601-1_2016-02-16.pdf)
8. [Frequently Asked Questions about Calendars](https://sroczynski.pl/download/calendar26.pdf)
9. [ISO Week Numbers — Monday Start and 53-Week Years, DateDB](https://us.datedb.net/almanac/iso-date-and-week/)
10. [OEIS A249404](https://oeis.org/A249404)
11. [What Week Number Is It? ISO vs US Week Numbers, worldtimedata](https://worldtimedata.com/productivity/what-week-number-is-it-iso-week-numbers-vs-us-week-numbers/)
12. [ISO 2015 – Numbering of weeks, GlobalSpec](https://standards.globalspec.com/std/1754639/iso-2015)
13. [Week Number Calculator — ISO and US Weeks, CornerTools](https://cornertools.com/week-number)
14. [Calendar maths, Tammergård](https://tammergard.se/blog/calendar-maths)
15. [datetime — Basic date and time types, Python 3 documentation](https://docs.python.org/3/library/datetime.html?highlight=datetime+strptime)
16. [ISOWeek Class, System.Globalization, Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/api/system.globalization.isoweek?view=netstandard-2.1)
17. [CLDR: LDML dates specification, Unicode](https://github.com/unicode-org/cldr/blob/main/docs/ldml/tr35-dates.md)
18. [timeanddate.com](https://www.timeanddate.com/date/week-numbers.html)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 测量与时间 › 历法 › Calendar mechanics and reform › Intercalation and leap rules

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/iso-week-date

English original: https://www.edgepedia.org/iso-week-date
