update outdate format info formatting

This commit is contained in:
steph
2022-12-21 11:24:48 -08:00
parent b220718b96
commit 22b66193dc
2 changed files with 76 additions and 78 deletions

View File

@@ -178,29 +178,27 @@ dateFormat YYYY-MM-DD
The following formatting options are supported: The following formatting options are supported:
```markdown | Input | Example | Description |
Input Example Description: | ---------- | -------------- | ------------------------------------------------------ |
| `YYYY` | 2014 | 4 digit year |
YYYY 2014 4 digit year | `YY` | 14 | 2 digit year |
YY 14 2 digit year | `Q` | 1..4 | Quarter of year. Sets month to first month in quarter. |
Q 1..4 Quarter of year. Sets month to first month in quarter. | `M MM` | 1..12 | Month number |
M MM 1..12 Month number | `MMM MMMM` | January..Dec | Month name in locale set by `moment.locale()` |
MMM MMMM January..Dec Month name in locale set by moment.locale() | `D DD` | 1..31 | Day of month |
D DD 1..31 Day of month | `Do` | 1st..31st | Day of month with ordinal |
Do 1st..31st Day of month with ordinal | `DDD DDDD` | 1..365 | Day of year |
DDD DDDD 1..365 Day of year | `X` | 1410715640.579 | Unix timestamp |
X 1410715640.579 Unix timestamp | `x` | 1410715640579 | Unix ms timestamp |
x 1410715640579 Unix ms timestamp | `H HH` | 0..23 | 24 hour time |
H HH 0..23 24 hour time | `h hh` | 1..12 | 12 hour time used with `a A`. |
h hh 1..12 12 hour time used with a A. | `a A` | am pm | Post or ante meridiem |
a A am pm Post or ante meridiem | `m mm` | 0..59 | Minutes |
m mm 0..59 Minutes | `s ss` | 0..59 | Seconds |
s ss 0..59 Seconds | `S` | 0..9 | Tenths of a second |
S 0..9 Tenths of a second | `SS` | 0..99 | Hundreds of a second |
SS 0..99 Hundreds of a second | `SSS` | 0..999 | Thousandths of a second |
SSS 0..999 Thousandths of a second | `Z ZZ` | +12:00 | Offset from UTC as +-HH:mm, +-HHmm, or Z |
Z ZZ +12:00 Offset from UTC as +-HH:mm, +-HHmm, or Z
```
More info in: https://momentjs.com/docs/#/parsing/string-format/ More info in: https://momentjs.com/docs/#/parsing/string-format/
@@ -214,32 +212,32 @@ axisFormat %Y-%m-%d
The following formatting strings are supported: The following formatting strings are supported:
```markdown | Format | Definition |
%a - abbreviated weekday name. | ------ | ------------------------------------------------------------------------------------------ |
%A - full weekday name. | %a | abbreviated weekday name |
%b - abbreviated month name. | %A | full weekday name |
%B - full month name. | %b | abbreviated month name |
%c - date and time, as "%a %b %e %H:%M:%S %Y". | %B | full month name |
%d - zero-padded day of the month as a decimal number [01,31]. | %c | date and time, as "%a %b %e %H:%M:%S %Y" |
%e - space-padded day of the month as a decimal number [ 1,31]; equivalent to %\_d. | %d | zero-padded day of the month as a decimal number \[01,31] |
%H - hour (24-hour clock) as a decimal number [00,23]. | %e | space-padded day of the month as a decimal number \[ 1,31]; equivalent to %\_d |
%I - hour (12-hour clock) as a decimal number [01,12]. | %H | hour (24-hour clock) as a decimal number \[00,23] |
%j - day of the year as a decimal number [001,366]. | %I | hour (12-hour clock) as a decimal number \[01,12] |
%m - month as a decimal number [01,12]. | %j | day of the year as a decimal number \[001,366] |
%M - minute as a decimal number [00,59]. | %m | month as a decimal number \[01,12] |
%L - milliseconds as a decimal number [000, 999]. | %M | minute as a decimal number \[00,59] |
%p - either AM or PM. | %L | milliseconds as a decimal number \[000, 999] |
%S - second as a decimal number [00,61]. | %p | either AM or PM |
%U - week number of the year (Sunday as the first day of the week) as a decimal number [00,53]. | %S | second as a decimal number \[00,61] |
%w - weekday as a decimal number [0(Sunday),6]. | %U | week number of the year (Sunday as the first day of the week) as a decimal number \[00,53] |
%W - week number of the year (Monday as the first day of the week) as a decimal number [00,53]. | %w | weekday as a decimal number \[0(Sunday),6] |
%x - date, as "%m/%d/%Y". | %W | week number of the year (Monday as the first day of the week) as a decimal number \[00,53] |
%X - time, as "%H:%M:%S". | %x | date, as "%m/%d/%Y" |
%y - year without century as a decimal number [00,99]. | %X | time, as "%H:%M:%S" |
%Y - year with century as a decimal number. | %y | year without century as a decimal number \[00,99] |
%Z - time zone offset, such as "-0700". | %Y | year with century as a decimal number |
%% - a literal "%" character. | %Z | time zone offset, such as "-0700" |
``` | %% | a literal "%" character |
More info in: <https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format> More info in: <https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format>
@@ -253,8 +251,8 @@ tickInterval 1day
The pattern is: The pattern is:
```markdown ```javascript
/^([1-9][0-9]\*)(minute|hour|day|week|month)$/ /^([1-9][0-9]*)(minute|hour|day|week|month)$/;
``` ```
More info in: <https://github.com/d3/d3-time#interval_every> More info in: <https://github.com/d3/d3-time#interval_every>

View File

@@ -144,32 +144,32 @@ axisFormat %Y-%m-%d
The following formatting strings are supported: The following formatting strings are supported:
```markdown | Format | Definition |
%a - abbreviated weekday name. | ------ | ----------------------------------------------------------------------------------------- |
%A - full weekday name. | %a | abbreviated weekday name |
%b - abbreviated month name. | %A | full weekday name |
%B - full month name. | %b | abbreviated month name |
%c - date and time, as "%a %b %e %H:%M:%S %Y". | %B | full month name |
%d - zero-padded day of the month as a decimal number [01,31]. | %c | date and time, as "%a %b %e %H:%M:%S %Y" |
%e - space-padded day of the month as a decimal number [ 1,31]; equivalent to %\_d. | %d | zero-padded day of the month as a decimal number [01,31] |
%H - hour (24-hour clock) as a decimal number [00,23]. | %e | space-padded day of the month as a decimal number [ 1,31]; equivalent to %\_d |
%I - hour (12-hour clock) as a decimal number [01,12]. | %H | hour (24-hour clock) as a decimal number [00,23] |
%j - day of the year as a decimal number [001,366]. | %I | hour (12-hour clock) as a decimal number [01,12] |
%m - month as a decimal number [01,12]. | %j | day of the year as a decimal number [001,366] |
%M - minute as a decimal number [00,59]. | %m | month as a decimal number [01,12] |
%L - milliseconds as a decimal number [000, 999]. | %M | minute as a decimal number [00,59] |
%p - either AM or PM. | %L | milliseconds as a decimal number [000, 999] |
%S - second as a decimal number [00,61]. | %p | either AM or PM |
%U - week number of the year (Sunday as the first day of the week) as a decimal number [00,53]. | %S | second as a decimal number [00,61] |
%w - weekday as a decimal number [0(Sunday),6]. | %U | week number of the year (Sunday as the first day of the week) as a decimal number [00,53] |
%W - week number of the year (Monday as the first day of the week) as a decimal number [00,53]. | %w | weekday as a decimal number [0(Sunday),6] |
%x - date, as "%m/%d/%Y". | %W | week number of the year (Monday as the first day of the week) as a decimal number [00,53] |
%X - time, as "%H:%M:%S". | %x | date, as "%m/%d/%Y" |
%y - year without century as a decimal number [00,99]. | %X | time, as "%H:%M:%S" |
%Y - year with century as a decimal number. | %y | year without century as a decimal number [00,99] |
%Z - time zone offset, such as "-0700". | %Y | year with century as a decimal number |
%% - a literal "%" character. | %Z | time zone offset, such as "-0700" |
``` | %% | a literal "%" character |
More info in: [https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format](https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format) More info in: [https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format](https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format)
@@ -184,7 +184,7 @@ tickInterval 1day
The pattern is: The pattern is:
```javascript ```javascript
/^([1-9][0-9]*)(minute|hour|day|week|month)$/ /^([1-9][0-9]*)(minute|hour|day|week|month)$/;
``` ```
More info in: [https://github.com/d3/d3-time#interval_every](https://github.com/d3/d3-time#interval_every) More info in: [https://github.com/d3/d3-time#interval_every](https://github.com/d3/d3-time#interval_every)