質問編集履歴

1

具体的な内容を追加

2020/11/28 06:19

投稿

kazu0905
kazu0905

スコア1

test CHANGED
File without changes
test CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  <tr v-for="user in users" v-bind:key="user.id" type="number">
10
10
 
11
- <th scope="row" >データ:{{ user.**** }} </th>
11
+ <th scope="row" >データ:{{ user.****| moment }} </th>
12
12
 
13
13
  </tr>
14
14
 
@@ -76,6 +76,16 @@
76
76
 
77
77
  },
78
78
 
79
+ filters: {
80
+
81
+ moment: function (date) {
82
+
83
+ return moment(date).format('LTS');
84
+
85
+ }
86
+
87
+ },
88
+
79
89
  }
80
90
 
81
91
  </script>
@@ -110,6 +120,30 @@
110
120
 
111
121
 
112
122
 
123
+ ### 発生している問題・エラーメッセージ
124
+
125
+
126
+
127
+ ```
128
+
129
+ Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
130
+
131
+ ```
132
+
133
+
134
+
135
+ Moment.jsを使用してみたのですが、GoogleChromeデベロッパーツールで上記のエラーが発生し表示できませんでした。
136
+
137
+
138
+
139
+ エラーメッセージを翻訳すると「提供された値は、認識されているRFC2822またはISO形式ではありません。」ということで変換する必要があるということはわかるのですが、メッセージに表示されているhttp://momentjs.com/guides/#/warnings/js-date/なども参考にしてみたのですが、変換の仕方がわかりません。
140
+
141
+
142
+
143
+
144
+
145
+
146
+
113
147
  ### 前提・実現したいこと
114
148
 
115
149
 
@@ -117,11 +151,3 @@
117
151
 
118
152
 
119
153
  Vue-CLIのプロジェクトでaxiosを使ってAPIからJSON形式の外部データを取得し、データ内に含まれてている「5:05:55 PM」という時刻を「UTC/協定世界時」から「JST/日本標準時」への変換を行いたいです。
120
-
121
-
122
-
123
- ###
124
-
125
-
126
-
127
- Moment.jsを使用してみたのですが、エラーが発生し表示できませんでした。