Skip to content

Commit 0095c6f

Browse files
committed
feat: formatDate() bug fix #64 - display meridiem
1 parent 2e68727 commit 0095c6f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

code-snippet.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*!code-snippet v1.2.1 | NHN Entertainment*/
1+
/*!code-snippet v1.2.2 | NHN Entertainment*/
22
/**********
33
* array.js
44
**********/
@@ -1856,6 +1856,9 @@ tui.util.Enum = Enum;
18561856
if (nDate.hour > 12) { //See the clock system: https://en.wikipedia.org/wiki/12-hour_clock
18571857
nDate.hour %= 12;
18581858
}
1859+
if (nDate.hour === 0) {
1860+
nDate.hour = 12;
1861+
}
18591862
nDate.meridiem = meridiem;
18601863
}
18611864

@@ -1871,7 +1874,6 @@ tui.util.Enum = Enum;
18711874
tui.util.formatDate = formatDate;
18721875
})(window.tui);
18731876

1874-
18751877
/**********
18761878
* func.js
18771879
**********/

0 commit comments

Comments
 (0)