From 2bbf68f998e6ef9a40bb98d87d3962858aa896de Mon Sep 17 00:00:00 2001 From: Min Somai <21338691+MinSomai@users.noreply.github.com> Date: Mon, 6 Feb 2023 00:19:45 +0530 Subject: [PATCH] Singular, Plural, and Shorthand arguments. There is some mention of shorthand arguments in Add section. Though it is not clear from the documentation about these options. Figured out these forms are supported from the test file in `start_end_of.js`. --- docs/moment/03-manipulating/03-start-of.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/moment/03-manipulating/03-start-of.md b/docs/moment/03-manipulating/03-start-of.md index 3ceb95ea3..acbe1417c 100644 --- a/docs/moment/03-manipulating/03-start-of.md +++ b/docs/moment/03-manipulating/03-start-of.md @@ -33,6 +33,17 @@ moment().startOf('hour'); moment().minutes(0).seconds(0).milliseconds(0) ``` +Singular, Plural, and Abbreviated forms are supported. +```javascript +moment().startOf('day'); +moment().startOf('days'); +moment().startOf('d'); + +moment().startOf('month'); +moment().startOf('months'); +moment().startOf('M'); +``` + As of version **2.0.0**, `moment#startOf('day')` replaced `moment#sod`. **Note:** `moment#startOf('week')` was added in version **2.0.0**.