Skip to content

Commit

Permalink
add documentation for z formatting
Browse files Browse the repository at this point in the history
I didn't see anything in the readme about contributions, but I'm hoping this is acceptable - I'm not 100% sure it fits with "parsing" - I haven't tried that side of the feature, but it does work for formatting per: iamkun/dayjs#1069 

Thanks for all your work on this package!
  • Loading branch information
PDXfoster authored Sep 7, 2021
1 parent d9a25cc commit adb8ef5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/parse/string-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you don't know the exact format of an input string, but know it could be one
dayjs("12-25-2001", ["YYYY", "YYYY-MM-DD"], 'es', true);
```

### List of all available parsing tokens
### List of available parsing tokens in the CustomParseFormat plugin

| Input | Example | Description |
| ------ | ---------------- | --------------------------------- |
Expand Down Expand Up @@ -62,4 +62,16 @@ dayjs("12-25-2001", ["YYYY", "YYYY-MM-DD"], 'es', true);
| `x` | 1410715640579 | Unix ms timestamp |


For additional formatting, version 1.9+ added timezone abbreviations using the advancedFormat plugin
```
var advanced = required("dayjs/plugin/advancedFormat")
dayjs.extend(advanced)
```

### List of all available parsing tokens with advancedFormat plugin

| Input | Example | Description |
| ------ | ---------------- | --------------------------------- |
| `z` | 01 | Timezone Abbreviation |


0 comments on commit adb8ef5

Please sign in to comment.