1001

static P2P wikisoft.
Log | Files | Refs | README

clock.js (317B)


      1 function Clock()
      2 {
      3   this.time = function()
      4   {
      5     var d = new Date(), e = new Date(d);
      6     return (e - d.setHours(0,0,0,0)/8640) * 100;
      7   }
      8 
      9   this.toString = function()
     10   {
     11     var t = `${this.time()}`;
     12     return t.substr(0,3)+":"+t.substr(3,3);
     13   }
     14 }
     15 
     16 Date.prototype.clock = function()
     17 {
     18   return new Clock();
     19 }