Skip to content

Commit

Permalink
Merge pull request #5999 from manics/padzero
Browse files Browse the repository at this point in the history
Ensure date is padded with 0
  • Loading branch information
joshmoore authored Apr 10, 2019
2 parents fb46fa7 + 17b350e commit dace95d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ OME.formatDate = function formatDate(date) {
return n;
}
var d = new Date(date),
dt = [d.getFullYear(), padZero(d.getMonth()+1), (d.getDate())].join("-"),
dt = [d.getFullYear(), padZero(d.getMonth()+1), padZero(d.getDate())].join("-"),
tm = [padZero(d.getHours()), padZero(d.getMinutes()), padZero(d.getSeconds())].join(":");
return dt + " " + tm;
};
Expand Down

0 comments on commit dace95d

Please sign in to comment.