From a0e23ed4f4af951b8e3592906f28db2e0c200076 Mon Sep 17 00:00:00 2001 From: Jap Date: Wed, 12 Feb 2020 10:56:48 +0100 Subject: [PATCH] Update moment.md Separated the format function to avoid confusion. Old syntax made it look like these functions could be chained. --- moment.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/moment.md b/moment.md index 7a11412b5..fd087a14a 100644 --- a/moment.md +++ b/moment.md @@ -17,12 +17,11 @@ This parses the given date using the given format. Returns a moment object. ### Formatting ```js -m - .format() - .format('dddd') - .format('MMM Do YY') // → "Sep 2nd 07" - .fromNow() // → "31 minutes ago" - .calendar() // → "Last Friday at 9:32PM" +m.format() // "2013-03-01T00:00:00+01:00" +m.format('dddd') // "Friday" +m.format('MMM Do YY') // "Mar 1st 13" +m.fromNow() // "7 years ago" +m.calendar() // "03/01/2013" ``` ### Add