updated documentation on date formatting for gantt
Rearragend the existing information and added new context information on the date formating process for Gantt charts. The former documentation was not clear on the difference between input and output formatting.
This commit is contained in:
parent
fa612b731c
commit
f2af5ce7eb
|
@ -127,23 +127,21 @@ Tbd
|
||||||
|
|
||||||
## Setting dates
|
## Setting dates
|
||||||
|
|
||||||
Tbd
|
`dateFormat` defines the format of the date **input** of your gantt elements. How these dates are represented in the rendered chart **output** are defined by `axisFormat`.
|
||||||
|
|
||||||
|
|
||||||
### Date format
|
### Input date format
|
||||||
|
|
||||||
The default date format is YYYY-MM-DD. You can define your ``dateFormat``. For example: 2020-3-7
|
The default input date format is `YYYY-MM-DD`. You can define your custom ``dateFormat``.
|
||||||
|
|
||||||
```
|
```
|
||||||
dateFormat YYYY MM DD
|
dateFormat YYYY-MM-DD
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The following formating options are supported:
|
||||||
|
|
||||||
### Diagram definition
|
```tsc
|
||||||
|
|
||||||
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.
|
||||||
|
@ -154,8 +152,6 @@ 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
|
||||||
|
|
||||||
Input Example Description
|
|
||||||
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
|
||||||
|
@ -166,11 +162,17 @@ 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: http://momentjs.com/docs/#/parsing/string-format/
|
More info in: http://momentjs.com/docs/#/parsing/string-format/
|
||||||
|
|
||||||
|
### Output date format on the axis
|
||||||
|
|
||||||
### Scale
|
The default output date format is YYYY-MM-DD. You can define your custom ``axisFormat``, like `2020-Q1` for the first quarter of the year 2020.
|
||||||
|
|
||||||
|
```
|
||||||
|
axisFormat %Y-%m-%d
|
||||||
|
```
|
||||||
|
|
||||||
|
The following formating strings are supported:
|
||||||
|
|
||||||
```
|
```
|
||||||
%a - abbreviated weekday name.
|
%a - abbreviated weekday name.
|
||||||
|
|
Loading…
Reference in New Issue