From f19fe198014ed56e8ed76a9761cfdea0753f1200 Mon Sep 17 00:00:00 2001 From: ecoyoung Date: Thu, 17 Sep 2026 16:59:21 +0800 Subject: [PATCH] docs(time): document ISO week inputs --- en/option/partial/2d-data.md | 4 ++++ zh/option/partial/2d-data.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/en/option/partial/2d-data.md b/en/option/partial/2d-data.md index cd986a75..616ce1b9 100644 --- a/en/option/partial/2d-data.md +++ b/en/option/partial/2d-data.md @@ -137,6 +137,10 @@ series: [{ + only part of year/month/date/time are specified: `'2012-03'`, `'2012-03-01'`, `'2012-03-01 05'`, `'2012-03-01 05:06'`. + separated by `"T"` or a space: `'2012-03-01T12:22:33.123'`, `'2012-03-01 12:22:33.123'`. + timezone specified: `'2012-03-01T12:22:33Z'`, `'2012-03-01T12:22:33+8000'`, `'2012-03-01T12:22:33-05:00'`. + + ISO week strings in `YYYY-Www` format (four-digit ISO week-numbering year and two-digit week), such as `'2026-W04'`, represent Monday of that week at local midnight. Week 1 contains January 4, so `'2020-W01'` represents December 30, 2019. Invalid week numbers are rejected, including week 53 in a year with only 52 ISO weeks. Appending a weekday, time, or timezone is not supported. + + {{ use: partial-version(version = '6.2.0') }} + + other date string format (all of these are treated as local time): `'2012'`, `'2012-3-1'`, `'2012/3/1'`, `'2012/03/01'`, `'2009/6/12 2:00'`, `'2009/6/12 2:05:08'`, `'2009/6/12 2:05:08.123'`. diff --git a/zh/option/partial/2d-data.md b/zh/option/partial/2d-data.md index 76a796b5..69f64f0d 100644 --- a/zh/option/partial/2d-data.md +++ b/zh/option/partial/2d-data.md @@ -133,6 +133,10 @@ series: [{ + 部分年月日时间: `'2012-03'`, `'2012-03-01'`, `'2012-03-01 05'`, `'2012-03-01 05:06'`. + 使用 `'T'` 或空格分割: `'2012-03-01T12:22:33.123'`, `'2012-03-01 12:22:33.123'`. + 时区设定: `'2012-03-01T12:22:33Z'`, `'2012-03-01T12:22:33+8000'`, `'2012-03-01T12:22:33-05:00'`. + + ISO 周字符串,格式为 `YYYY-Www`(四位 ISO 周编号年份和两位周数),例如 `'2026-W04'`,表示该周星期一的本地时间零点。第 1 周包含 1 月 4 日,因此 `'2020-W01'` 表示 2019 年 12 月 30 日。无效周数会被拒绝,包括在只有 52 个 ISO 周的年份中使用第 53 周。不支持附加星期、时间或时区。 + + {{ use: partial-version(version = '6.2.0') }} + + 其他的时间字符串,包括(均表示本地时间): `'2012'`, `'2012-3-1'`, `'2012/3/1'`, `'2012/03/01'`, `'2009/6/12 2:00'`, `'2009/6/12 2:05:08'`, `'2009/6/12 2:05:08.123'`