Skip to content

Commit

Permalink
docs: Fix doc error in format escaping with curly brackets (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-sokolov authored and iamkun committed Feb 19, 2019
1 parent d4cd3ad commit 4accf0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/en/API-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,12 @@ dayjs().endOf('month')
### Format `.format(stringWithTokens: string)`

Returns a `string` with the `Dayjs`'s formatted date.
To escape characters, wrap them in square or curly brackets (e.g. `[G] {um}`).
To escape characters, wrap them in square brackets (e.g. `[G] [um]`).

```js
dayjs().format() // current date in ISO6801, without fraction seconds e.g. '2020-04-02T08:02:17-05:00'

dayjs('2019-01-25').format('{YYYY} MM-DDTHH:mm:ssZ[Z]') // '{2019} 01-25T00:00:00-02:00Z'
dayjs('2019-01-25').format('[YYYY] YYYY-MM-DDTHH:mm:ssZ[Z]') // 'YYYY 2019-01-25T00:00:00-02:00Z'

dayjs('2019-01-25').format('DD/MM/YYYY') // '25/01/2019'
```
Expand Down

0 comments on commit 4accf0e

Please sign in to comment.