Changeset 10280


Ignore:
Timestamp:
Feb 24, 2010, 4:35:51 AM (12 years ago)
Author:
charles
Message:

(trunk web) #2966: "Patch: Present time with correct number of digits in the web interface" -- added to trunk for 1.92. thanks to gongloo for the patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/javascript/common.js

    r10060 r10280  
    235235                hours = 12;
    236236        }
    237 
    238         time = [hours, myDate.getMinutes(), myDate.getSeconds()].join(':');
     237        if(hours < 10){
     238                hours = "0" + hours;
     239        }
     240        var minutes = myDate.getMinutes();
     241        if(minutes < 10){
     242                minutes = "0" + minutes;
     243        }
     244        var seconds = myDate.getSeconds();
     245                if(seconds < 10){
     246                        seconds = "0" + seconds;
     247        }
     248
     249        time = [hours, minutes, seconds].join(':');
    239250
    240251        return [date, time, period].join(' ');
Note: See TracChangeset for help on using the changeset viewer.