Skip to content

Commit 1d2b166

Browse files
committed
Fix locale.time(date,true) (short version) to not include seconds
1 parent 818fdd6 commit 1d2b166

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libs/js/banglejs/locale.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
exports = { name : "en_GB", currencySym:"£",
22
translate : str=>str, // as-is
33
date : (d,short) => short?("0"+d.getDate()).substr(-2)+"/"+("0"+(d.getMonth()+1)).substr(-2)+"/"+d.getFullYear():d.toString().substr(4,11), // Date to "Feb 28 2020" or "28/02/2020"(short)
4-
time : (d,short) => { // Date to "4:15.28 pm" or "15:42.59"(short)
4+
time : (d,short) => { // Date to "4:15.28 pm" or "15:42"(short)
55
if (short)
6-
return d.toString().substr(16,5)+"."+d.toString().substr(22,2);
6+
return d.toString().substr(16,5);
77
else {
88
var h = d.getHours(), m = d.getMinutes(), r = "am";
99
if (h==0) { h=12; }

libs/js/banglejs/locale.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)