質問編集履歴

2

追記

2015/11/09 06:02

投稿

star24star
star24star

スコア115

test CHANGED
File without changes
test CHANGED
@@ -63,3 +63,11 @@
63
63
 
64
64
 
65
65
  よろしくお願いいたします
66
+
67
+
68
+
69
+ -- 解決 --
70
+
71
+ お二人ともご回答をくださり有難うございました!
72
+
73
+ 今後の参考にもなりました。

1

内容修正

2015/11/09 06:01

投稿

star24star
star24star

スコア115

test CHANGED
File without changes
test CHANGED
@@ -29,3 +29,37 @@
29
29
  ご存知の方がいらっしゃいましたら
30
30
 
31
31
  ご教授いただけると幸いでございます。
32
+
33
+
34
+
35
+ -- 修正 --
36
+
37
+
38
+
39
+ 月を取得したいので、dateではなくmonth
40
+
41
+ ```
42
+
43
+ date.setMonth(date.getMonth() - 1
44
+
45
+ ```
46
+
47
+ が正しかったです。
48
+
49
+
50
+
51
+ ほかにもいろいろと調べてみたのですが
52
+
53
+ ```
54
+
55
+ var date = new Date('{{yyyymmdd}}');
56
+
57
+ month_1 = date .getMonth() - 1;
58
+
59
+ ```
60
+
61
+ とかでもいけるのでしょうか...?
62
+
63
+
64
+
65
+ よろしくお願いいたします