# HG changeset patch # User Michiel Broek # Date 1554141454 -7200 # Node ID da1f4525169d476f2c3c1925ee0a20c254fca24f # Parent a51b858aaccafaab0630a18a33d21c0979a6ed56 Round days for brews that overlap summer/wintertime changes. diff -r a51b858aacca -r da1f4525169d www/js/prod_inprod.js --- a/www/js/prod_inprod.js Mon Apr 01 19:52:34 2019 +0200 +++ b/www/js/prod_inprod.js Mon Apr 01 19:57:34 2019 +0200 @@ -80,7 +80,8 @@ date2_unixtime = parseInt(date2.getTime() / 1000); // This is the calculated difference in seconds var timeDifference = date1_unixtime - date2_unixtime; - var timeDifferenceInDays = timeDifference / 60 / 60 / 24; + // Round the result for brews that overlap summer/wintertime changes. + var timeDifferenceInDays = Math.round(timeDifference / 60 / 60 / 24); if (timeDifferenceInDays >= 14) fase = StageData[value].nl + " dag " + (timeDifferenceInDays - 14) + " van 28"; else