aboutsummaryrefslogblamecommitdiffstats
path: root/hesla.js
blob: f6cdc51aeca8e344323c6fc8c30cdd2711731969 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
                                      
 
               









                                                 


                                      

      
       


                                            
 



                                                         
if (!Date.prototype.toISODateString) {

  (function() {

    function pad(number) {
      var r = String(number);
      if ( r.length === 1 ) {
        r = '0' + r;
      }
      return r;
    }

    Date.prototype.toISODateString = function() {
      return this.getFullYear() +
    '-' + pad( this.getMonth() + 1 ) +
    '-' + pad( this.getDate() );
    };

  }());
}

var today_id = new Date().toISODateString();

window.addEventListener("pageshow", function() {
  var today_losungen = document.getElementById(today_id);
  today_losungen.style.display = "block";
}, false);