Momentjs-date-of-month

提供:Dev Guides
2020年6月23日 (火) 03:57時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

MomentJS-月の日付

このメソッドは、月の日を取得/設定します。 翌月に追加される範囲よりも大きい場合は、1〜31の入力を受け取ります。

構文

moment().date(Number);
moment().date();
moment().dates(Number);
moment().dates();

var m = moment().date();//gets the current day of the month
var d = moment().date(2);//sets the day of month as shown below
var k = moment().date(40);//sets the day of month which is greater than the
range so the output shows the next month as shown in the output

出力

月の日付