Skip to content

Commit 918732a

Browse files
committed
feat(time): add meridian template {A}/{a} (apache/echarts#19888)
1 parent a7ef4f8 commit 918732a

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

en/option/component/axis-common.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -843,30 +843,32 @@ Next, we are going to introduce these three forms one by one.
843843

844844
Using string templates is an easy way to format date/time with frequently used formats. If it can be used to make what you want, you are advised to do so. If not, you could then consider the others. Supported formats are:
845845

846-
| Group | Template | Value (EN) | Value (ZH) |
847-
|--------------|----------|----------------------------------------------------------------|----------------------------------------------------------------------------|
848-
| Year | {yyyy} | e.g., 2020, 2021, ... | 例:2020, 2021, ... |
849-
| | {yy} | 00-99 | 00-99 |
850-
| Quarter | {Q} | 1, 2, 3, 4 | 1, 2, 3, 4 |
851-
| Month | {MMMM} | e.g., January, February, ... | 一月、二月、…… |
852-
| | {MMM} | e.g., Jan, Feb, ... | 1月、2月、…… |
853-
| | {MM} | 01-12 | 01-12 |
854-
| | {M} | 1-12 | 1-12 |
855-
| Day of Month | {dd} | 01-31 | 01-31 |
856-
| | {d} | 1-31 | 1-31 |
857-
| Day of Week | {eeee} | Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday | 星期日、星期一、星期二、星期三、星期四、星期五、星期六 |
858-
| | {ee} | Sun, Mon, Tues, Wed, Thu, Fri, Sat | 日、一、二、三、四、五、六 |
859-
| | {e} | 1-54 | 1-54 |
860-
| Hour | {HH} | 00-23 | 00-23 |
861-
| | {H} | 0-23 | 0-23 |
862-
| | {hh} | 01-12 | 01-12 |
863-
| | {h} | 1-12 | 1-12 |
864-
| Minute | {mm} | 00-59 | 00-59 |
865-
| | {m} | 0-59 | 0-59 |
866-
| Second | {ss} | 00-59 | 00-59 |
867-
| | {s} | 0-59 | 0-59 |
868-
| Millisecond | {SSS} | 000-999 | 000-999 |
869-
| | {S} | 0-999 | 0-999 |
846+
| Group | Template | Value (EN) | Value (ZH) |
847+
|--------------|------------|--------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
848+
| Year | {yyyy} | e.g. 2020, 2021, ... | 例:2020, 2021, ... |
849+
| | {yy} | 00-99 | 00-99 |
850+
| Quarter | {Q} | 1, 2, 3, 4 | 1, 2, 3, 4 |
851+
| Month | {MMMM} | e.g. January, February, ... | 一月、二月、…… |
852+
| | {MMM} | e.g. Jan, Feb, ... | 1月、2月、…… |
853+
| | {MM} | 01-12 | 01-12 |
854+
| | {M} | 1-12 | 1-12 |
855+
| Day of Month | {dd} | 01-31 | 01-31 |
856+
| | {d} | 1-31 | 1-31 |
857+
| Day of Week | {eeee} | Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday | 星期日、星期一、星期二、星期三、星期四、星期五、星期六 |
858+
| | {ee} | Sun, Mon, Tues, Wed, Thu, Fri, Sat | 日、一、二、三、四、五、六 |
859+
| | {e} | 1-54 | 1-54 |
860+
| Hour | {HH} | 00-23 | 00-23 |
861+
| | {H} | 0-23 | 0-23 |
862+
| | {hh} | 01-12 | 01-12 |
863+
| | {h} | 1-12 | 1-12 |
864+
| Minute | {mm} | 00-59 | 00-59 |
865+
| | {m} | 0-59 | 0-59 |
866+
| Second | {ss} | 00-59 | 00-59 |
867+
| | {s} | 0-59 | 0-59 |
868+
| Millisecond | {SSS} | 000-999 | 000-999 |
869+
| | {S} | 0-999 | 0-999 |
870+
| Meridian | {A} | AM, PM (Since `v5.5.1`, i18n will be finished in the next version) | 上午、下午 (`v5.5.1` 仅支持英文,将在下个版本支持中文及其他语言) |
871+
| | {a} | am, pm | 上午、下午 |
870872

871873
> Templates of other languages can be found in [the language package](https://github.com/apache/echarts/tree/master/src/i18n). Please refer to [echarts.registerLocale](api.html#echarts.registerLocale) to register a language.
872874

0 commit comments

Comments
 (0)