回答編集履歴
3
ES3017 -> ES2017
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
少なくとも、ES
|
9
|
+
少なくとも、ES2017にネイティブ関数はなく、自分で実装するしかなさそうなので、作ってみました。
|
10
10
|
|
11
11
|
|
12
12
|
|
2
gist
test
CHANGED
@@ -10,9 +10,9 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
-
- [toISOLocalString(): 現在のロケールに対応した「ISO 8601 拡張形式」の日付文字列を返します](https://gist.github.com/think49/910b913051cc94e765f1bc347d5089db)
|
13
|
+
- [toISOLocalString(): 現在のロケールに対応した「ISO 8601 拡張形式」の日付文字列を返します - Gist](https://gist.github.com/think49/910b913051cc94e765f1bc347d5089db)
|
14
14
|
|
15
|
-
- [String.prototype.padStart, String.prototype.padEnd の Polyfill (ECMAScript 2017 / ECMA-262 8th edition)](https://gist.github.com/think49/d0e01c82c12bda2d27d8)
|
15
|
+
- [String.prototype.padStart, String.prototype.padEnd の Polyfill (ECMAScript 2017 / ECMA-262 8th edition) - Gist](https://gist.github.com/think49/d0e01c82c12bda2d27d8)
|
16
16
|
|
17
17
|
|
18
18
|
|
1
単純に9時間を足してあげれば良いだけの話?
test
CHANGED
@@ -21,6 +21,14 @@
|
|
21
21
|
console.log(toISOLocalString(new Date('2014-10-10T04:50:40Z'))); // "2014-10-10T13:50:40.000+09:00"
|
22
22
|
|
23
23
|
```
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
> 単純に9時間を足してあげれば良いだけの話なのでしょうか?
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
そういう考え方もありますが、`getFullYear`, `getMonth`, `getDate`...etc は、現在のロケールに対応した数値を返す仕様なので、一度、date オブジェクトに変換すれば、楽に出力できると思います。
|
24
32
|
|
25
33
|
|
26
34
|
|