From da30696346c9f83433bd11a698b26cdda1904294 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Sat, 15 Sep 2018 15:06:15 +0800 Subject: [PATCH] moment: link to You Don't Need Moment --- moment.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/moment.md b/moment.md index c9893c257..7a11412b5 100644 --- a/moment.md +++ b/moment.md @@ -9,19 +9,20 @@ tags: [Featurable] ### Parsing ```js -m = moment("2013-03-01", "YYYY-MM-DD") +m = moment('2013-03-01', 'YYYY-MM-DD') ``` 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" + .format('MMM Do YY') // → "Sep 2nd 07" + .fromNow() // → "31 minutes ago" + .calendar() // → "Last Friday at 9:32PM" ``` ### Add @@ -56,6 +57,12 @@ See [datetime](./datetime) for more. ## References - * [Datetime cheatsheet](./datetime) _(devhints.io)_ - * [Moment website](http://momentjs.com/) _(momentjs.com)_ - * [Moment docs](http://momentjs.com/docs/) _(momentjs.com)_ +### Alternatives + +* [You don't need Moment.js](https://github.com/you-dont-need/You-Dont-Need-Momentjs) _(github.com)_ + +### Also see + +* [Datetime cheatsheet](./datetime) _(devhints.io)_ +* [Moment website](http://momentjs.com/) _(momentjs.com)_ +* [Moment docs](http://momentjs.com/docs/) _(momentjs.com)_