Merge pull request #1356 from JapMul/patch-1

Update moment.md
This commit is contained in:
Rico Sta. Cruz 2020-02-13 21:49:47 +11:00 committed by GitHub
commit 0db542841d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -17,12 +17,11 @@ This parses the given date using the given format. Returns a moment object.
### Formatting ### Formatting
```js ```js
m m.format() // "2013-03-01T00:00:00+01:00"
.format() m.format('dddd') // "Friday"
.format('dddd') m.format('MMM Do YY') // "Mar 1st 13"
.format('MMM Do YY') // → "Sep 2nd 07" m.fromNow() // "7 years ago"
.fromNow() // → "31 minutes ago" m.calendar() // "03/01/2013"
.calendar() // → "Last Friday at 9:32PM"
``` ```
### Add ### Add