Skip to content
Snippets Groups Projects
Commit 1956eb27 authored by Tyler Staples's avatar Tyler Staples Committed by aaron.ferris
Browse files

Issue #3220837: Updated 12 hour clock logic

parent 4e3f9e45
Branches
2 merge requests!7Issue #3220837: Updated 12 hour clock logic,!2Issue #3342335: Coding Standard Issues
Pipeline #458151 passed with warnings
......@@ -49,12 +49,8 @@
var sec = timenow.getSeconds();
if ( this.props['clock_type'] == 0 ) {
var am_pm = ""
if ( hr <= 12 ) {
am_pm = "am";
} else {
am_pm = "pm";
hr = hr - 12;
}
am_pm = hr < 12 ? "am" : "pm";
hr = hr % 12 || 12;
this.element.html(hr + ":" + LZ(min) + ":" + LZ(sec) + am_pm);
} else if ( this.props['clock_type'] == 1 ) {
this.element.html(hr + ":" + LZ(min) + ":" + LZ(sec));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment