{"id":1033,"date":"2018-08-30T02:14:53","date_gmt":"2018-08-29T17:14:53","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=1033"},"modified":"2018-08-30T02:14:53","modified_gmt":"2018-08-29T17:14:53","slug":"%e5%85%a852%e9%a0%85%e7%9b%ae%ef%bc%81moment-js%e6%97%a5%e4%bb%98%e3%83%87%e3%83%bc%e3%82%bf%e5%8f%96%e5%be%97%e3%83%bb%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%ef%bc%88setter-getter%ef%bc%89%e5%ae%9f","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=1033","title":{"rendered":"\u516852\u9805\u76ee\uff01Moment.js\u65e5\u4ed8\u30c7\u30fc\u30bf\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b\uff08Setter, Getter\uff09\u5b9f\u4f8b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001<a href=\"https:\/\/blog.capilano-fw.com\/?p=990\">\u516889\u9805\u76ee\uff01Moment.js\u65e5\u4ed8\u306e\u64cd\u4f5c\uff06\u6bd4\u8f03\u30fb\u5b9f\u4f8b<\/a>\u306e\u8a18\u4e8b\u3067\u306fMoment.js\u3092\u4f7f\u3063\u3066\u6642\u9593\u3092\u9032\u3081\u305f\u308a\u3001\u904e\u53bb\u30fb\u672a\u6765\u306e\u3082\u306e\u3067\u3042\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u4eca\u56de\u306fMoment.js\u306e\u7b2c\uff13\u56de\u3068\u3057\u3066\u3001<code>\u5e74<\/code>\u3001<code>\u6708<\/code>\u3001<code>\u65e5<\/code>\u3001<code>\u6642<\/code>\u3001<code>\u5206<\/code>\u3001<code>\u79d2<\/code>\u306a\u3069\u5404\u65e5\u4ed8\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u3068\u8a2d\u5b9a\uff08\u3064\u307e\u308aSetter\u3068Getter\uff09\u3092\u3059\u308b\u5b9f\u4f8b\u96c6\u3092\u304a\u5c4a\u3051\u3057\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u52b9\u7387\u7684\u306a\u30b3\u30fc\u30c9\u69cb\u7bc9\u306e\u305f\u3081\u306b\u5f79\u7acb\u3066\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-731 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/07\/panda_2.png\" alt=\"\" width=\"149\" height=\"120\" \/><\/p>\n<p><strong>\u5b9f\u884c\u74b0\u5883<\/strong><\/p>\n<p>Moment.js: \u30d0\u30fc\u30b8\u30e7\u30f3 2.22.2\uff08\u65e5\u672c\u8a9e\u5bfe\u5fdc\u30b3\u30fc\u30c9\u3082\u8aad\u307f\u8fbc\u3093\u3067\u3044\u308b\u3082\u306e\u3068\u3057\u307e\u3059\uff09<\/p>\n<h1>\u5404\u65e5\u4ed8\u30c7\u30fc\u30bf\u306e\u53d6\u5f97<\/h1>\n<h2>year()\u3067\u5e74\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5\u300d\u306e\u5e74\u30c7\u30fc\u30bf\uff08Number\u578b\uff09\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01').<strong>year()<\/strong>; \/\/ <strong>2018<\/strong><\/pre>\n<p><code>years()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>month()\u3067\u6708\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e7411\u670822\u65e5\u300d\u306e\u6708\u30c7\u30fc\u30bf\uff08Number\u578b\uff09\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-11-22').<strong>month()<\/strong>; \/\/ <strong>10\uff08\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308b\u6570\u5b57\uff09<\/strong><\/pre>\n<p>\u3053\u3053\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u306a\u306e\u306f\u3001<code>month()<\/code>\u3067\u53d6\u5f97\u3067\u304d\u308b\u30c7\u30fc\u30bf\u306f<strong>\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308b\u6570\u5024\u3060\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/strong><\/p>\n<p>\u203b \u8a73\u3057\u3044\u6708\u30c7\u30fc\u30bf\u306f<a href=\"#month_number\">\u5bfe\u5fdc\u3059\u308b\u6708\u30c7\u30fc\u30bf<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><code>months()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>date()\u3067\u65e5\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e7411\u670822\u65e5\u300d\u306e\u65e5\u30c7\u30fc\u30bf\uff08Number\u578b\uff09\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-11-22').<strong>date()<\/strong>; \/\/ <strong>22<\/strong><\/pre>\n<p>\u76f4\u611f\u7684\u306b\u65e5\u306e\u53d6\u5f97\u306f<code>day()<\/code>\u3092\u4f7f\u3063\u3066\u3057\u307e\u3044\u304c\u3061\u3067\u3059\u304c\u3001<strong>\u5b9f\u969b\u306b\u306f<code>date()<\/code>\u306a\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/p>\n<p><code>dates()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>hour()\u3067\u6642\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5 17\u664200\u5206\u300d\u306e\u6642\u30c7\u30fc\u30bf\uff08Number\u578b\uff09\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01 17:00').<strong>hour()<\/strong>; \/\/ <strong>17<\/strong><\/pre>\n<p><code>hours()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>minute()\u3067\u5206\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5 17\u664235\u5206\u300d\u306e\u5206\u30c7\u30fc\u30bf\uff08Number\u578b\uff09\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01 17:35').<strong>minute()<\/strong>; \/\/ <strong>35<\/strong><\/pre>\n<p><code>minutes()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>second()\u3067\u79d2\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5 17\u664235\u520622\u79d2\u300d\u306e\u79d2\u30c7\u30fc\u30bf\uff08Number\u578b\uff09\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01 17:35:22').<strong>second()<\/strong>; \/\/ <strong>22<\/strong><\/pre>\n<p><code>seconds()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>millisecond()\u3067\u30df\u30ea\u79d2\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5 17\u664235\u520622.999\u79d2\u300d\u306e\u30df\u30ea\u79d2\u30c7\u30fc\u30bf\uff08Number\u578b\uff09\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01 17:35:22.999').<strong>millisecond()<\/strong>; \/\/ <strong>999<\/strong><\/pre>\n<p><code>milliseconds()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2 id=\"day\">day()\u3067\u66dc\u65e5\u756a\u53f7\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670829\u65e5\uff08\u6c34\uff09\u300d\u306e\u66dc\u65e5\u756a\u53f7\uff08Number\u578b\uff09\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-08-29').<strong>day()<\/strong>; \/\/ <strong>3<\/strong><\/pre>\n<p>\u53d6\u5f97\u3067\u304d\u308b\u6570\u5024\u306f<code>\uff10\u301c\uff16<\/code>\u3067\u3059\u3002<\/p>\n<p>\u203b \u8a73\u3057\u3044\u66dc\u65e5\u756a\u53f7\u306f\u3001<a href=\"#weekday_number\">\u5bfe\u5fdc\u3059\u308b\u66dc\u65e5\u756a\u53f7<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><code>days()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>weekday()\u3067\u30ed\u30fc\u30ab\u30eb\u306e\u66dc\u65e5\u756a\u53f7\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670829\u65e5\uff08\u6c34\uff09\u300d\u306e\u66dc\u65e5\u756a\u53f7\uff08Number\u578b\uff09\u3092\u30ed\u30fc\u30ab\u30eb\u5f62\u5f0f\u3067\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-08-29').<strong>weekday()<\/strong>; \/\/ <strong>3<\/strong><\/pre>\n<p>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u73fe\u5728\u9069\u7528\u3055\u308c\u3066\u3044\u308b\u30ed\u30fc\u30ab\u30eb\u8a2d\u5b9a\u306e\u66dc\u65e5\u756a\u53f7\u304c\u9069\u7528\u3055\u308c\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u9031\u304c\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308b\u5834\u5408\u306f<code>\uff10\u301c\uff16<\/code>\u3001\uff11\u304b\u3089\u59cb\u307e\u308b\u5834\u5408\u306f<code>\uff11\u301c\uff17<\/code>\u304c\u53d6\u5f97\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u56fa\u5b9a\u3057\u305f\u6570\u5b57\u306b\u3057\u305f\u3044\u5834\u5408\u306f\u3001<a href=\"#day\">day()<\/a>\u304b<a href=\"#iso_weekday\">isoWeekday()<\/a>\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2 id=\"iso_weekday\">isoWeekday()\u3067ISO\u5f62\u5f0f\u306e\u66dc\u65e5\u756a\u53f7\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670826\u65e5\uff08\u65e5\uff09\u300d\u306e\u66dc\u65e5\u756a\u53f7\uff08Number\u578b\uff09\u3092ISO\u5f62\u5f0f\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-08-26').<strong>isoWeekday()<\/strong>; \/\/ <b>7<\/b><\/pre>\n<p><code>\uff11\u301c\uff17<\/code>\u306e\u66dc\u65e5\u756a\u53f7\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u203b \u8a73\u3057\u3044\u66dc\u65e5\u756a\u53f7\u306f\u3001<a href=\"#weekday_number\">\u5bfe\u5fdc\u3059\u308b\u66dc\u65e5\u756a\u53f7<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>dayOfYear()\u3067\u5e74\u306e\u4f55\u65e5\u76ee\u304b\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670829\u65e5\u300d\u304c\u5e74\u306e\u4f55\u65e5\u76ee\u304b\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2020-08-29').<strong>dayOfYear()<\/strong>; \/\/ <strong>242<\/strong><\/pre>\n<p>\u3046\u308b\u3046\u5e74\u3092\u542b\u3081\u308b\u3068\u3001\u53d6\u5f97\u3067\u304d\u308b\u6570\u5024\u306f<code>\uff11\u301c366<\/code>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>moment(<strong>'2020-12-31'<\/strong>).dayOfYear(); \/\/ <strong>366\uff08\u3046\u308b\u3046\u5e74\uff09<\/strong><\/pre>\n<h2>week()\u3067\u5e74\u306e\u4f55\u9031\u76ee\u304b\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670829\u65e5\u300d\u304c\u5e74\u306e\u4f55\u9031\u76ee\u304b\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-08-29').<strong>week()<\/strong>; \/\/ <strong>35<\/strong><\/pre>\n<p><code>weeks()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>isoWeek()\u3067\u5e74\u306e\u4f55\u9031\u76ee\u304b\u3092ISO\u5f62\u5f0f\u3067\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670829\u65e5\u300d\u304c\u5e74\u306e\u4f55\u9031\u76ee\u304b\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-08-29').<strong>isoWeek()<\/strong>; \/\/ <strong>35<\/strong><\/pre>\n<p>\u203b week-year\uff08\u9031\u5e74\uff09\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/blog.capilano-fw.com\/?p=908#l_gggg\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><code>isoWeeks()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>quarter()\u3067\uff14\u534a\u671f\uff08\uff13\u30f5\u6708\u3054\u3068\u306e\uff09\u756a\u53f7\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>moment('2018-03-31').<strong>quarter()<\/strong>; \/\/ <strong>1<\/strong><\/pre>\n<p>\u3064\u307e\u308a\u3001\u53d6\u5f97\u3067\u304d\u308b\u6570\u5024\u306f<code>\uff11\u301c\uff14<\/code>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><code>quarters()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>weekYear()\u3067\u9031\u5e74\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>moment('2018-01-01').<strong>weekYear()<\/strong>; \/\/ <strong>2018<\/strong><\/pre>\n<p>\u203b week-year\uff08\u9031\u5e74\uff09\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/blog.capilano-fw.com\/?p=908#l_gggg\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>isoWeekYear()\u3067\u9031\u5e74\u3092ISO\u5f62\u5f0f\u3067\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>moment('2018-01-01').<strong>isoWeekYear()<\/strong>; \/\/ <strong>2018<\/strong><\/pre>\n<p>\u203b week-year\uff08\u9031\u5e74\uff09\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/blog.capilano-fw.com\/?p=908#l_gggg\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>weeksInYear()\u3067\u5e74\u306b\u4f55\u9031\u9593\u3042\u308b\u304b\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>moment('2018-01-01').<strong>weeksInYear()<\/strong>; \/\/ <strong>52<\/strong><\/pre>\n<h2>isoWeeksInYear()\u3067\u5e74\u306b\u4f55\u9031\u9593\u3042\u308b\u304b\u3092ISO\u5f62\u5f0f\u3067\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>moment('2018-01-01').<strong>isoWeeksInYear()<\/strong>; \/\/ <strong>52<\/strong><\/pre>\n<p>\u203b week-year\uff08\u9031\u5e74\uff09\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/blog.capilano-fw.com\/?p=908#l_gggg\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>get()\u3067\u5404\u65e5\u4ed8\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u300c\u5e74\u6708\u65e5\u6642\u5206\u79d2\u300d\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-08-29').<strong>get('year')<\/strong>; \/\/ <strong>2018<\/strong>\r\nmoment('2018-08-29').<strong>get('month')<\/strong>; \/\/ <strong>7\uff08\u203b\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308b\u6570\u5b57\uff09\r\n<\/strong>moment('2018-08-29').<strong>get('date'); \/\/ 29\uff08\u203b\u300cday\u300d\u3067\u306f\u306a\u3044\uff09\r\n<\/strong>moment('2018-08-29')<strong>.get('hour'); \/\/ 17\r\n<\/strong>moment('2018-08-29 17:33')<strong>.get('minute'); \/\/ 33\r\n<\/strong>moment('2018-08-29 17:30:25')<strong>.get('second'); \/\/ 25\r\n<\/strong>moment('2018-08-29 17:30:25.999')<strong>.get('millisecond'); \/\/ 999\r\n<\/strong><\/pre>\n<h2 id=\"from_now\">fromNow()\u3067\u73fe\u5728\u6642\u9593\u304b\u3089\u3069\u308c\u3060\u3051\u5dee\u304c\u3042\u308b\u304b\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5\u300d\u304b\u3089\u73fe\u5728\u6642\u523b\u304c\u3069\u306e\u304f\u3089\u3044\u96e2\u308c\u3066\u3044\u308b\u304b\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01').<strong>fromNow()<\/strong>; \/\/ <strong>8\u30f6\u6708\u524d<\/strong><\/pre>\n<p>\u203b\u82f1\u8a9e\u74b0\u5883\u306e\u5834\u5408\u306f<code>8 months ago<\/code>\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u203b\u9006\u306b\u73fe\u5728\u6642\u9593\u3078\u3069\u308c\u3060\u3051\u5dee\u304c\u3042\u308b\u304b\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f<a href=\"#to_now\">toNow()<\/a>\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3082\u3057\u300c\u524d\u300d\u300c\u5f8c\u300d\u304c\u4e0d\u8981\u306a\u5834\u5408\u306f\u3001\u5f15\u6570\u306b<code>true<\/code>\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>moment('2018-01-01').fromNow(<strong>true<\/strong>); \/\/ <strong>8\u30f6\u6708<\/strong><\/pre>\n<h2 id=\"from\">from()\u3067\u57fa\u6e96\u306e\u6642\u9593\u304b\u3089\u3069\u308c\u3060\u3051\u5dee\u304c\u3042\u308b\u304b\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5\u300d\u304b\u3089\u3001\u300c2018\u5e744\u67081\u65e5\u300d\u306f\u3069\u308c\u3060\u3051\u5dee\u304c\u3042\u308b\u304b\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>var baseTime = moment('2018-01-15');\r\nmoment('2018-04-01').<strong>from(baseTime)<\/strong>; \/\/ <strong>3\u30f6\u6708\u5f8c<\/strong><\/pre>\n<p>\u3061\u306a\u307f\u306b<code>from()<\/code>\u306f\u3001moment\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3060\u3051\u3067\u306a\u304f\u3001\u914d\u5217\u306a\u3069\u3082\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>moment('2018-04-01').<strong>from([2018, 0, 15])<\/strong>; \/\/ <strong>3\u30f6\u6708\u5f8c\u30020\u306f1\u6708\r\n<\/strong>moment('2018-04-01')<strong>.from(new Date(2018, 0, 15)); \/\/ 3\u30f6\u6708\u5f8c\r\n<\/strong>moment('2018-04-01')<strong>.from('2018-01-15'); \/\/ 3\u30f6\u6708\u5f8c\r\n<\/strong><\/pre>\n<p>\u3082\u3057\u300c\u524d\u300d\u300c\u5f8c\u300d\u304c\u4e0d\u8981\u306a\u5834\u5408\u306f\u3001\u7b2c\uff12\u5f15\u6570\u306b<code>true<\/code>\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>moment('2018-04-01').from('2018-01-15', <strong>true<\/strong>); \/\/ <strong>3\u30f6\u6708<\/strong><\/pre>\n<p>\u203b\u57fa\u6e96\u306e\u6642\u9593\u3078\u3069\u308c\u3060\u3051\u5dee\u304c\u3042\u308b\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u306f<a href=\"#from\">to()<\/a>\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2 id=\"to_now\">toNow()\u3067\u73fe\u5728\u6642\u9593\u3078\u3069\u308c\u3060\u3051\u5dee\u304c\u3042\u308b\u304b\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5\u300d\u3078\u73fe\u5728\u6642\u523b\u304b\u3089\u3069\u306e\u304f\u3089\u3044\u96e2\u308c\u3066\u3044\u308b\u304b\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01').<strong>toNow()<\/strong>; \/\/ <strong>8\u30f6\u6708\u5f8c<\/strong><\/pre>\n<p>\u203b\u82f1\u8a9e\u74b0\u5883\u306e\u5834\u5408\u306f<code>in 8 months<\/code>\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u203b\u9006\u306b\u73fe\u5728\u6642\u9593\u304b\u3089\u3069\u308c\u3060\u3051\u5dee\u304c\u3042\u308b\u304b\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f<a href=\"#from_now\">fromNow()<\/a>\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3082\u3057\u300c\u524d\u300d\u300c\u5f8c\u300d\u304c\u4e0d\u8981\u306a\u5834\u5408\u306f\u3001\u5f15\u6570\u306b<code>true<\/code>\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>moment('2018-01-01').toNow(<strong>true<\/strong>); \/\/ <strong>8\u30f6\u6708<\/strong><\/pre>\n<h2 id=\"to\">to()\u3067\u57fa\u6e96\u306e\u6642\u9593\u3078\u3069\u308c\u3060\u3051\u5dee\u304c\u3042\u308b\u304b\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e744\u67081\u65e5\u300d\u3078\u300c2018\u5e741\u670815\u65e5\u300d\u304b\u3089\u3069\u308c\u3060\u3051\u5dee\u304c\u3042\u308b\u304b\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>var baseTime = moment('2018-01-15');\r\nmoment('2018-04-01').<strong>to(baseTime)<\/strong>; \/\/ <strong>3\u30f6\u6708\u524d<\/strong><\/pre>\n<p>\u3061\u306a\u307f\u306b<code>to()<\/code>\u306f\u3001moment\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3060\u3051\u3067\u306a\u304f\u3001\u914d\u5217\u306a\u3069\u3082\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>moment('2018-04-01').<strong>to([2018, 0, 15])<\/strong>; \/\/ <strong>3\u30f6\u6708\u524d\u30020\u306f1\u6708\r\n<\/strong>moment('2018-04-01')<strong>.to(new Date(2018, 0, 15)); \/\/ 3\u30f6\u6708\u524d\r\n<\/strong>moment('2018-04-01')<strong>.to('2018-01-15'); \/\/ 3\u30f6\u6708\u524d\r\n<\/strong><\/pre>\n<p>\u3082\u3057\u300c\u524d\u300d\u300c\u5f8c\u300d\u304c\u4e0d\u8981\u306a\u5834\u5408\u306f\u3001\u7b2c\uff12\u5f15\u6570\u306b<code>true<\/code>\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>moment('2018-04-01').to('2018-01-15', <strong>true<\/strong>); \/\/ <strong>3\u30f6\u6708<\/strong><\/pre>\n<p>\u203b\u57fa\u6e96\u306e\u6642\u9593\u304b\u3089\u3069\u308c\u3060\u3051\u5dee\u304c\u3042\u308b\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u306f<a href=\"#from\">from()<\/a>\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>calendar()\u3067\u76f8\u5bfe\u7684\u306b\u898b\u305f\u65e5\u4ed8\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u660e\u65e5\u304b\u3089\u898b\u305f\u73fe\u5728\u306e\u65e5\u6642\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>var tomorrow = moment('2018-01-02 17:00'); \/\/ \u660e\u65e5\r\nvar now = moment('2018-01-01 15:00');\r\nnow.calendar(tomorrow); \/\/ <strong>\u6628\u65e5 15:00\uff08\u660e\u65e5\u304b\u3089\u898b\u305f\u76f8\u5bfe\u7684\u306a\u65e5\u4ed8\uff09<\/strong><\/pre>\n<p>\u3061\u306a\u307f\u306b\u8868\u793a\u5f62\u5f0f\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u5148\u9031\u6728\u66dc\u65e5 23:00<\/li>\n<li>\u65e5\u66dc\u65e5 23:00<\/li>\n<li>\u4eca\u65e5 20:00<\/li>\n<li>\u660e\u65e5 21:00<\/li>\n<li>\u6765\u9031\u706b\u66dc\u65e5 23:00<\/li>\n<li>2018\/08\/15<\/li>\n<\/ul>\n<p>\u306a\u304a\u3001<code>calendar()<\/code>\u306e\u7b2c\uff12\u5f15\u6570\u306b\u306f\u8868\u793a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>moment().calendar(null, <strong>{<\/strong>\r\n<strong>    sameDay: '[\u304d\u3087\u3046]',<\/strong>\r\n<strong>    nextDay: '[\u3042\u3059]',<\/strong>\r\n<strong>    nextWeek: 'dddd',<\/strong>\r\n<strong>    lastDay: '[\u304d\u306e\u3046]',<\/strong>\r\n<strong>    lastWeek: '[\u524d\u306e] dddd',<\/strong>\r\n<strong>    sameElse: 'YYYY\u5e74MM\u6708DD\u65e5'<\/strong>\r\n<strong>}<\/strong>);<\/pre>\n<p>\u203b\u65e5\u4ed8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3068\u3057\u3066\u7f6e\u304d\u63db\u3048\u305f\u304f\u306a\u3044\u6587\u5b57\u306f\u3001<strong><code>[<\/code><\/strong>\u3068<strong><code>]<\/code><\/strong>\u306e\u62ec\u5f27\u3067\u56f2\u307f\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u5404\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u306f\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u4f8b\u306f\u3001\u65e5\u66dc\u65e5\u306e\u5834\u5408\u3060\u3051\u8868\u793a\u3092\u5909\u3048\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre>moment().calendar(null, <strong>{<\/strong>\r\n<strong>    sameDay: function (now) {<\/strong>\r\n\r\n<strong>        if(now.weekday() == 0) { \/\/ \u65e5\u66dc\u65e5<\/strong>\r\n\r\n<strong>            return '[\u4eca\u65e5\uff08\u3044\u3044\u4f11\u65e5\u3092\uff01\uff09]';<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return '[\u4eca\u65e5]';<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong>);<\/pre>\n<h2>diff()\u3067\uff12\u3064\u306e\u65e5\u4ed8\u306e\u5dee\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5\u300d\u3068\u300c2018\u5e741\u67082\u65e5\u300d\u306e\u5dee\u3092\u30df\u30ea\u79d2\u3067\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>var dt1 = moment('2018-01-01');\r\nvar dt2 = moment('2018-01-02');\r\ndt1.<strong>diff(dt2)<\/strong>; \/\/ <strong>-86400000<\/strong><\/pre>\n<p>\u6ce8\u610f\u304c\u5fc5\u8981\u306a\u306e\u306f\u3001\u9006\u306b<code>dt2<\/code>\u3092\u57fa\u6e96\u3068\u3057\u305f\u5834\u5408\u306f\u30d7\u30e9\u30b9\u306e\u6570\u5b57\u306b\u306a\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<pre><strong>dt2<\/strong>.diff(dt1); \/\/ <strong>86400000<\/strong><\/pre>\n<p>\u307e\u305f\u3001\u7b2c\uff12\u5f15\u6570\u306b<code>years<\/code>\u3084<code>months<\/code>\u306a\u3069\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u305d\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>var dt1 = moment('2018-01-01');\r\nvar dt2 = moment('2019-01-01'); \/\/ <strong>1\u5e74\u5f8c\u306e\u65e5\u4ed8<\/strong>\r\n\r\ndt2.diff(dt1, <strong>'years'<\/strong>); \/\/ <strong>1<\/strong>\r\ndt2.diff(dt1, <strong>'months'<\/strong>); \/\/ <strong>12<\/strong>\r\ndt2.diff(dt1, <strong>'days'<\/strong>); \/\/ <strong>365<\/strong>\r\ndt2.diff(dt1, <strong>'hours'<\/strong>); \/\/ <strong>8760<\/strong>\r\ndt2.diff(dt1, <strong>'minutes'<\/strong>); \/\/ <strong>525600<\/strong>\r\ndt2.diff(dt1, <strong>'seconds'<\/strong>); \/\/ <strong>31536000<\/strong>\r\ndt2.diff(dt1, <strong>'milliseconds'<\/strong>); \/\/ <strong>31536000000<\/strong><\/pre>\n<h2>valueOf()\u3067\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\uff08\u30df\u30ea\u79d2\uff09\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>moment().valueOf(); \/\/ 1535557480209<\/pre>\n<p>\u3061\u306a\u307f\u306b\u4ee5\u4e0b\u3067\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>+moment(); \/\/1535557480209<\/pre>\n<h2>unix()\u3067\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\uff08\u79d2\uff09\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>moment().unix(); \/\/ 1535557585<\/pre>\n<h2>daysInMonth()\u3067\u6708\u306b\u4f55\u65e5\u3042\u308b\u304b\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\uff11\u6708\u3068\uff12\u6708\u306e\u65e5\u6570\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01').<strong>daysInMonth()<\/strong>; \/\/ <strong>31<\/strong>\uff08\u65e5\uff09\r\nmoment('2018-02-01').<strong>daysInMonth()<\/strong>; \/\/ <strong>28<\/strong>\uff08\u65e5\uff09<\/pre>\n<h2>toDate()\u3067JavaScript\u306eDate\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>var date = moment().<strong>toDate()<\/strong>; \/\/ Date\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/pre>\n<h2>toArray()\u3067\u5404\u7a2e\u65e5\u4ed8\u30c7\u30fc\u30bf\u3092\u914d\u5217\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670829\u65e5\u300117\u664230\u520625.999\u79d2\u300d\u3092\u914d\u5217\u3067\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>var dateArray = moment().<strong>toArray()<\/strong>;<\/pre>\n<p>\u53d6\u5f97\u3067\u304d\u308b\u30c7\u30fc\u30bf\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>[2018, 7, 29, 17, 30, 25, 999]<\/pre>\n<p>\u30c7\u30fc\u30bf\u306e\u4e26\u3073\u306f\u3001<\/p>\n<ul>\n<li>\u5e74<\/li>\n<li>\u6708\uff08\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308b\u6570\u5b57\u3002\u8a73\u3057\u304f\u306f<a href=\"#month_number\">\u5bfe\u5fdc\u3059\u308b\u6708\u30c7\u30fc\u30bf<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\uff09<\/li>\n<li>\u65e5<\/li>\n<li>\u6642<\/li>\n<li>\u5206<\/li>\n<li>\u79d2<\/li>\n<li>\u30df\u30ea\u79d2<\/li>\n<\/ul>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>toJson()\u3067JSON\u7528\u306e\u65e5\u4ed8\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>moment('2018-08-29 17:30:25.999').<strong>toJSON()<\/strong>; \/\/ <strong>2018-08-29T08:30:25.999Z<\/strong>\uff08ISO8601\uff09<\/pre>\n<p>\u3053\u3053\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u306a\u306e\u306f\u3001<strong>\u53d6\u5f97\u3067\u304d\u308b\u306e\u306fJSON\u30c7\u30fc\u30bf\u3067\u306f\u306a\u304f\u3001JSON\u7528\u306e\u65e5\u4ed8\u30c7\u30fc\u30bf\uff08String\u578b\uff09\u3060\u3068\u3044\u3046\u70b9\u3067\u3059\u3002<\/strong><\/p>\n<p>\u3064\u307e\u308a\u3001\u3082\u3057JSON\u306b\u3057\u305f\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>stringify()<\/code>\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre>JSON.stringify({\r\n    postDate : dateForJson\r\n});<\/pre>\n<p>\u307e\u305f\u3001\u65e5\u4ed8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u5909\u66f4\u3059\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u4e8b\u524d\u306b\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u6307\u5b9a\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre><strong>moment.fn.toJSON<\/strong> = function() {\r\n\r\n    <strong>return this.format('YYYY\u5e74MM\u6708DD\u65e5');<\/strong>\r\n\r\n};<\/pre>\n<p>\u306a\u304a\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u76f4\u63a5\u30b7\u30ea\u30a2\u30e9\u30a4\u30ba\u5316\u3059\u308b\u5834\u5408\u306f\u81ea\u52d5\u7684\u306bISO8601\u306e\u6587\u5b57\u5217\u306b\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<pre>JSON.stringify({\r\n    postDate : <strong>moment('2018-08-29 17:30:25.999')<\/strong>\r\n});<\/pre>\n<h2>toISOString()\u3067ISO8601\u5f62\u5f0f\u306e\u65e5\u4ed8\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>moment().<strong>toISOString()<\/strong>; \/\/ <strong>2018-08-29T16:16:58.236Z<\/strong><\/pre>\n<p>\u3082\u3057UTC\u3078\u306e\u5909\u63db\u3092\u3057\u305f\u304f\u306a\u3044\u5834\u5408\u306f\u7b2c\uff11\u5f15\u6570\u306b<code>true<\/code>\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>moment().toISOString(<strong>true<\/strong>); \/\/ 2018-08-30T01:21:48.792+09:00<\/pre>\n<h2>toObject()\u3067\u5404\u7a2e\u65e5\u4ed8\u30c7\u30fc\u30bf\u3092\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670829\u65e5\u300117\u664230\u520625.999\u79d2\u300d\u3092\u914d\u5217\u3067\u53d6\u5f97\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>var dateObject = moment().<strong>toObject()<\/strong>;<\/pre>\n<p>\u53d6\u5f97\u3067\u304d\u308b\u30c7\u30fc\u30bf\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>{\r\n    <strong>date<\/strong>: 29, \/\/ <strong>\u300cday\u300d\u3067\u306f\u306a\u3044<\/strong>\r\n    <strong>hours<\/strong>: 17,\r\n    <strong>milliseconds<\/strong>: 999,\r\n    <strong>minutes<\/strong>: 30,\r\n    <strong>months<\/strong>: 7, \/\/ <strong>\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308b\u6570\u5b57<\/strong>\r\n    <strong>seconds<\/strong>: 25,\r\n    <strong>years<\/strong>: 2018\r\n}<\/pre>\n<h2>toString()\u3067\u65e5\u4ed8\u30c7\u30fc\u30bf\u3092\u30c6\u30ad\u30b9\u30c8\u3067\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>moment('2018-08-29 17:30:25.999').<strong>toString()<\/strong>; \/\/ <strong>Wed Aug 29 2018 17:30:25 GMT+0900<\/strong><\/pre>\n<p>\u203b \u305f\u3060\u3057\u3001\u65e5\u672c\u8a9e\u74b0\u5883\u306b\u3057\u3066\u3044\u3066\u3082\u53d6\u5f97\u3067\u304d\u308b\u30c7\u30fc\u30bf\u306f\u82f1\u8a9e\u3067\u3059\u3002<\/p>\n<h2>inspect()\u3067\u691c\u67fb\u7528\u6587\u5b57\u5217\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<pre>moment('2018-08-29 17:30:25.999').<strong>inspect()<\/strong>; \/\/ <strong>moment(\"2018-08-29T17:30:25.999\")<\/strong><\/pre>\n<p>\u203b \u4e3b\u306a\u7528\u9014\u306f\u30c7\u30d0\u30c3\u30b0\u3067\u3059\u3002<\/p>\n<h1>\u5404\u65e5\u4ed8\u30c7\u30fc\u30bf\u306e\u8a2d\u5b9a<\/h1>\n<h2>year()\u3067\u5e74\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5\u300d\u306e\u5e74\u30c7\u30fc\u30bf\u30922020\u5e74\u306b\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01').<strong>year(2020)<\/strong>; \/\/ 2020\u5e741\u67081\u65e5<\/pre>\n<p><code>years()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>month()\u3067\u6708\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5\u300d\u306e\u6708\u30c7\u30fc\u30bf\u309210\u6708\u306b\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01').<strong>month(9)<\/strong>; \/\/ 2018\u5e74<strong>10\u6708<\/strong>1\u65e5<\/pre>\n<p>\u3053\u3053\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u306a\u306e\u306f\u3001<code>month()<\/code>\u3067\u8a2d\u5b9a\u3067\u304d\u308b\u30c7\u30fc\u30bf\u306f\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308b\u6570\u5024\u3060\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u203b \u8a73\u3057\u3044\u6708\u30c7\u30fc\u30bf\u306f<a href=\"#month_number\">\u5bfe\u5fdc\u3059\u308b\u6708\u30c7\u30fc\u30bf<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><code>months()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>date()\u3067\u65e5\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5\u300d\u306e\u65e5\u30c7\u30fc\u30bf\u309222\u65e5\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01').<strong>date(22)<\/strong>; \/\/ 2018\u5e741\u670822\u65e5<\/pre>\n<p>\u76f4\u611f\u7684\u306b\u65e5\u306e\u8a2d\u5b9a\u306f<code>day()<\/code>\u3092\u4f7f\u3063\u3066\u3057\u307e\u3044\u304c\u3061\u3067\u3059\u304c\u3001<strong>\u5b9f\u969b\u306b\u306f<code>date()<\/code>\u306a\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/p>\n<p><code>dates()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>hour()\u3067\u6642\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5 17\u664200\u5206\u300d\u306e\u6642\u30c7\u30fc\u30bf\u309220\u6642\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01 17:00').<strong>hour(20)<\/strong>; \/\/ 2018\u5e741\u67081 20:00<\/pre>\n<p><code>hours()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>minute()\u3067\u5206\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e7411\u670822\u65e5 17\u664235\u5206\u300d\u306e\u5206\u30c7\u30fc\u30bf\u309220\u5206\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01 17:35').<strong>minute(20)<\/strong>; \/\/ 2018\u5e741\u67081\u65e5 17:20<\/pre>\n<p><code>minutes()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>second()\u3067\u79d2\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e7411\u670822\u65e5 17\u664235\u520622\u79d2\u300d\u306e\u79d2\u30c7\u30fc\u30bf\u309255\u79d2\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01 17:35:22').<strong>second(55)<\/strong>; \/\/ 2018\u5e741\u67081\u65e5 17:35:55<\/pre>\n<p><code>seconds()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>millisecond()\u3067\u30df\u30ea\u79d2\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e7411\u670822\u65e5 17\u664235\u520622.999\u79d2\u300d\u306e\u30df\u30ea\u79d2\u30c7\u30fc\u30bf\u3092111\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01 17:35:22.999').<strong>millisecond(111)<\/strong>; \/\/ 2018\u5e741\u67081\u65e5 17:35:22.111<\/pre>\n<p><code>milliseconds()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>day()\u3067\u66dc\u65e5\u756a\u53f7\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670829\u65e5\uff08\u6c34\uff09\u300d\u3092\u4eca\u9031\u65e5\u66dc\u65e5\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-08-29').<strong>day(0)<\/strong>; \/\/ <strong>2018\u5e748\u670826\u65e5\uff08\u65e5\uff09<\/strong><\/pre>\n<p>\u3064\u307e\u308a\u3001\u6307\u5b9a\u3059\u308b\u6570\u5024\u304c<code>\uff10\u301c\uff16<\/code>\u306e\u5834\u5408\u306f\u3001\u4eca\u9031\u306e\u65e5\u4ed8\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u6570\u5024\u306b\u306f\u30de\u30a4\u30ca\u30b9\u3092\u542b\u3081\u305f\u4ed6\u306e\u6570\u5024\u3082\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670829\u65e5\uff08\u6c34\uff09\u300d\u3092\u5148\u9031\u65e5\u66dc\u65e5\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>moment('2018-08-29').<strong>day(-7)<\/strong>; \/\/ <strong>2018\u5e748\u670819\u65e5\uff08\u65e5\uff09<\/strong><\/pre>\n<p>\u203b \u8a73\u3057\u3044\u66dc\u65e5\u756a\u53f7\u306f\u3001<a href=\"#weekday_number\">\u5bfe\u5fdc\u3059\u308b\u66dc\u65e5\u756a\u53f7<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><code>days()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>weekday()\u3067\u30ed\u30fc\u30ab\u30eb\u306e\u66dc\u65e5\u756a\u53f7\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670829\u65e5\uff08\u6c34\uff09\u300d\u3092\u4eca\u9031\u65e5\u66dc\u65e5\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-08-29').<strong>weekday(0)<\/strong>; \/\/ <strong>2018\u5e748\u670826\u65e5\uff08\u65e5\uff09<\/strong><\/pre>\n<p>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u73fe\u5728\u9069\u7528\u3055\u308c\u3066\u3044\u308b\u30ed\u30fc\u30ab\u30eb\u8a2d\u5b9a\u306e\u66dc\u65e5\u756a\u53f7\u304c\u9069\u7528\u3055\u308c\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u9031\u304c\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308b\u5834\u5408\u306f<code>\uff10\u301c\uff16<\/code>\u3001\uff11\u304b\u3089\u59cb\u307e\u308b\u5834\u5408\u306f<code>\uff11\u301c\uff17<\/code>\u304c\u9069\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u30de\u30a4\u30ca\u30b9\u3092\u542b\u3081\u305f\u4ed6\u306e\u6570\u5024\u3082\u6709\u52b9\u3067\u3059\u3002<\/p>\n<h2>isoWeekday()\u3067ISO\u5f62\u5f0f\u306e\u66dc\u65e5\u756a\u53f7\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e748\u670829\u65e5\uff08\u6c34\uff09\u300d\u3092\u4eca\u9031\u6708\u66dc\u65e5\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-08-29').isoWeekday(1); \/\/ <strong>2018\u5e748\u670827\u65e5\uff08\u6708\uff09<\/strong><\/pre>\n<p><code>\uff11\u301c\uff17<\/code>\u306e\u66dc\u65e5\u756a\u53f7\u3092\u57fa\u6e96\u3068\u3057\u305f\u6570\u5024\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u30de\u30a4\u30ca\u30b9\u3092\u542b\u3081\u305f\u4ed6\u306e\u6570\u5024\u3082\u6709\u52b9\u3067\u3059\u3002<\/p>\n<p>\u203b \u8a73\u3057\u3044\u66dc\u65e5\u756a\u53f7\u306f\u3001<a href=\"#weekday_number\">\u5bfe\u5fdc\u3059\u308b\u66dc\u65e5\u756a\u53f7<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>dayOfYear()\u3067\u5e74\u306e\u4f55\u65e5\u76ee\u304b\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u65e5\u4ed8\u3092\u300c2018\u5e748\u670829\u65e5\u300d\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2020-01-01').<strong>dayOfYear(242)<\/strong>; \/\/ 2020\u5e748\u670829\u65e5, \u5e74\u306e242\u65e5\u76ee\u306f\u30018\u670829\u65e5<\/pre>\n<p>\u3046\u308b\u3046\u5e74\u306e\u6700\u7d42\u65e5\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>moment(<strong>'2020-01-01'<\/strong>).dayOfYear(366); \/\/ 2020\u5e7412\u670831\u65e5, \u3046\u308b\u3046\u5e74<\/pre>\n<p>\u306a\u304a\u3001\u30de\u30a4\u30ca\u30b9\u306e\u6570\u5024\u3082\u6709\u52b9\u3067\u3059\u3002<\/p>\n<h2>week()\u3067\u5e74\u306e\u4f55\u9031\u76ee\u304b\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5\u300d\u306b\u5e74\u306e2\u9031\u76ee\u3092\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01').<strong>week(2)<\/strong>; \/\/ <strong>2018\u5e741\u67088\u65e5<\/strong><\/pre>\n<p>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u5b9f\u884c\u74b0\u5883\u306e\u9031\u304c\u30bc\u30ed\u3067\u306f\u3058\u307e\u308b\u304b\u3001\uff11\u3067\u59cb\u307e\u308b\u304b\u3067\u7d50\u679c\u304c\u5909\u308f\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<p><code>weeks()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>isoWeek()\u3067\u5e74\u306e\u4f55\u9031\u76ee\u304b\u3092ISO\u5f62\u5f0f\u3067\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u300c2018\u5e741\u67081\u65e5\u300d\u306b\u5e74\u306e2\u9031\u76ee\u3092\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-01-01').<strong>isoWeek(2)<\/strong>; \/\/ <strong>2018\u5e741\u67088\u65e5<\/strong><\/pre>\n<p>\u203b week-year\uff08\u9031\u5e74\uff09\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/blog.capilano-fw.com\/?p=908#l_gggg\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><code>isoWeeks()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>quarter()\u3067\uff14\u534a\u671f\uff08\uff13\u30f5\u6708\u3054\u3068\u306e\uff09\u756a\u53f7\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<pre>moment('2018-01-01').<strong>quarter(2)<\/strong>; \/\/ <strong>2018\u5e744\u67081\u65e5<\/strong><\/pre>\n<p><code>quarters()<\/code>\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>weekYear()\u3067\u9031\u5e74\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<pre>moment('2018-01-01').<strong>weekYear(2020)<\/strong>; \/\/ <strong>2019\u5e7412\u670830\u65e5<\/strong><\/pre>\n<p>\u203b week-year\uff08\u9031\u5e74\uff09\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/blog.capilano-fw.com\/?p=908#l_gggg\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>isoWeekYear()\u3067\u9031\u5e74\u3092ISO\u5f62\u5f0f\u3067\u8a2d\u5b9a\u3059\u308b<\/h2>\n<pre>moment('2018-01-01').<strong>isoWeekYear(2020)<\/strong>; \/\/ <strong>2019\u5e7412\u670830\u65e5<\/strong><\/pre>\n<p>\u203b week-year\uff08\u9031\u5e74\uff09\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/blog.capilano-fw.com\/?p=908#l_gggg\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>set()\u3067\u5404\u65e5\u4ed8\u30c7\u30fc\u30bf\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n<p>\u300c\u5e74\u6708\u65e5\u6642\u5206\u79d2\u300d\u3092\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3067\u3059\u3002<\/p>\n<pre>moment('2018-08-29').<strong>set('year', 2020)<\/strong>; \/\/ <strong>2020\u5e748\u670829\u65e5<\/strong>\r\nmoment('2018-08-29').<strong>set('month', 7)<\/strong>; \/\/ <strong>2020\u5e748\u670829\u65e5\uff08\u203b\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308b\u6570\u5b57\u3092\u6307\u5b9a\uff09<\/strong>\r\nmoment('2018-08-29').<strong>set('date', 15)<\/strong>; \/\/ <strong>2020\u5e748\u670815\u65e5\uff08\u203b\u300cday\u300d\u3067\u306f\u306a\u3044\uff09<\/strong>\r\nmoment('2018-08-29 17:00').<strong>set('hour', 8)<\/strong>; \/\/ <strong>2018\u5e748\u670829\u65e5 08:00<\/strong>\r\nmoment('2018-08-29 17:33').<strong>set('minute', 8)<\/strong>; \/\/ <strong>2018\u5e748\u670829\u65e5 17:08<\/strong>\r\nmoment('2018-08-29 17:30:25').<strong>set('second', 8)<\/strong>; \/\/ <strong>2018\u5e748\u670829\u65e5 17:30:08<\/strong>\r\nmoment('2018-08-29 17:30:25.999').<strong>set('millisecond', 111)<\/strong>; \/\/ <strong>2018\u5e748\u670829\u65e5 17:30:25.111<\/strong><\/pre>\n<h1 id=\"month_number\">\u5bfe\u5fdc\u3059\u308b\u6708\u30c7\u30fc\u30bf<\/h1>\n<ul>\n<li>0\u3000\u30fb\u30fb\u30fb\u30001\u6708<\/li>\n<li>1\u3000\u30fb\u30fb\u30fb\u30002\u6708<\/li>\n<li>2\u3000\u30fb\u30fb\u30fb\u30003\u6708<\/li>\n<li>3\u3000\u30fb\u30fb\u30fb\u30004\u6708<\/li>\n<li>4\u3000\u30fb\u30fb\u30fb\u30005\u6708<\/li>\n<li>5\u3000\u30fb\u30fb\u30fb\u30006\u6708<\/li>\n<li>6\u3000\u30fb\u30fb\u30fb\u30007\u6708<\/li>\n<li>7\u3000\u30fb\u30fb\u30fb\u30008\u6708<\/li>\n<li>8\u3000\u30fb\u30fb\u30fb\u30009\u6708<\/li>\n<li>9\u3000\u30fb\u30fb\u30fb\u300010\u6708<\/li>\n<li>10\u3000\u30fb\u30fb\u30fb\u300011\u6708<\/li>\n<li>11\u3000\u30fb\u30fb\u30fb\u300012\u6708<\/li>\n<\/ul>\n<h1 id=\"weekday_number\">\u5bfe\u5fdc\u3059\u308b\u66dc\u65e5\u756a\u53f7<\/h1>\n<p><strong>\uff08\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308b\u5834\u5408\uff09<\/strong><\/p>\n<ul>\n<li>0\u3000\u30fb\u30fb\u30fb\u3000\u65e5<\/li>\n<li>1\u3000\u30fb\u30fb\u30fb\u3000\u6708<\/li>\n<li>2\u3000\u30fb\u30fb\u30fb\u3000\u706b<\/li>\n<li>3\u3000\u30fb\u30fb\u30fb\u3000\u6c34<\/li>\n<li>4\u3000\u30fb\u30fb\u30fb\u3000\u6728<\/li>\n<li>5\u3000\u30fb\u30fb\u30fb\u3000\u91d1<\/li>\n<li>6\u3000\u30fb\u30fb\u30fb\u3000\u571f<\/li>\n<\/ul>\n<p><strong>\uff08\uff11\u304b\u3089\u59cb\u307e\u308b\u5834\u5408\uff09<\/strong><\/p>\n<ul>\n<li><strong>7\u3000\u30fb\u30fb\u30fb\u3000\u65e5<\/strong><\/li>\n<li>1\u3000\u30fb\u30fb\u30fb\u3000\u6708<\/li>\n<li>2\u3000\u30fb\u30fb\u30fb\u3000\u706b<\/li>\n<li>3\u3000\u30fb\u30fb\u30fb\u3000\u6c34<\/li>\n<li>4\u3000\u30fb\u30fb\u30fb\u3000\u6728<\/li>\n<li>5\u3000\u30fb\u30fb\u30fb\u3000\u91d1<\/li>\n<li>6\u3000\u30fb\u30fb\u30fb\u3000\u571f<\/li>\n<\/ul>\n<h1>\u7d42\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56deMoment.js\u306eSetter\u3001Getter\u3001\u305d\u306e\u4ed6\u306e\u30c7\u30fc\u30bf\u53d6\u5f97\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u305f\u3060\u3001\u4eca\u56de\u306e\u4f5c\u696d\u3067\u4e00\u756a\u306f\u3058\u3081\u306b\u611f\u3058\u305f\u3053\u3068\u306f\u4ee5\u4e0b\u306e\uff12\u70b9\u3067\u3057\u305f\u3002<\/p>\n<ul>\n<li>day()\u306f\u65e5\u30c7\u30fc\u30bf\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u306a\u3044\u3002\u76f4\u611f\u7684\u306b\u306fdate()\u3067\u306f\u306a\u304f\u3053\u3061\u3089\u306e\u65b9\u304c\u3044\u3044\u306e\u3067\u306f\u30fb\u30fb\u30fb\uff1f\uff1f\uff1f<\/li>\n<li>\u6d77\u5916\u306e\u6708\u540d\u304c\u30c6\u30ad\u30b9\u30c8\u306a\u306e\u3067\u4ed5\u65b9\u306a\u3044\u3068\u3044\u3048\u3070\u4ed5\u65b9\u306a\u3044\u3093\u3067\u3059\u304c\u3001\u3084\u306f\u308a\u6708\u30c7\u30fc\u30bf\u3060\u3051\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308b\u6570\u5b57\u3068\u3044\u3046\u306e\u306b\u9055\u548c\u611f\u304c\u3042\u308a\u307e\u3059\u3002\u306a\u3093\u3068\u304b\u8a2d\u5b9a\u3067\u304d\u306a\u3044\u3082\u306e\u304b\u306a\uff1f\uff1f<\/li>\n<\/ul>\n<p>\u4ed6\u306b\u306fcalendar()\u3067\u76f8\u5bfe\u7684\u306b\u898b\u305f\u65e5\u4ed8\u30c7\u30fc\u30bf\u3068\u3044\u3046\u306e\u304c\u3001\u3068\u3066\u3082\u4fbf\u5229\u306a\u3093\u3058\u3083\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3057\u305f\u3002\u3053\u3046\u3044\u3046\u8a08\u7b97\u3092\u81ea\u52d5\u7684\u306b\u3084\u3063\u3066\u304f\u308c\u308b\u3063\u3066\u30db\u30f3\u30c8\u4f5c\u696d\u52b9\u7387\u306e\u5411\u4e0a\u306b\u3064\u306a\u304c\u308a\u307e\u3059\u3002<\/p>\n<p>\u307f\u306a\u3055\u3093\u306f\u3001\u3069\u306e\u9805\u76ee\u306b\u6ce8\u76ee\u3057\u305f\u3067\u3057\u3087\u3046\u304b\u3002<br \/>\n\u305c\u3072\u4f5c\u696d\u306e\u52b9\u7387\u5316\u306b\u5f79\u7acb\u3066\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-444 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/16.png\" alt=\"\" width=\"370\" height=\"310\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/16.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/16-300x251.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u516889\u9805\u76ee\uff01Moment.js\u65e5\u4ed8\u306e\u64cd\u4f5c\uff06\u6bd4\u8f03\u30fb\u5b9f\u4f8b\u306e\u8a18\u4e8b\u3067\u306fMoment.js\u3092\u4f7f\u3063\u3066\u6642\u9593\u3092\u9032\u3081\u305f\u308a\u3001\u904e\u53bb\u30fb\u672a\u6765\u306e\u3082\u306e\u3067\u3042\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u65b9\u6cd5\u3092\u7d39 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=1033\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u516852\u9805\u76ee\uff01Moment.js\u65e5\u4ed8\u30c7\u30fc\u30bf\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b\uff08Setter, Getter\uff09\u5b9f\u4f8b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":1055,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[78],"class_list":["post-1033","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-moment-js"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1033","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1033"}],"version-history":[{"count":37,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1033\/revisions"}],"predecessor-version":[{"id":1073,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/1033\/revisions\/1073"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/1055"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}