@007julien can you please explain what exactly this Math.floor(days+11/12) achieves I'm asking this because...
@felgall & Philip M variables days_count and root_days are used elsewhere in the code also, so I thought i can do this (I know i can assign d to anyting after this, but still didn't want to confuse myself)
Code:
if (days%1<0.11) {root_days = Math.floor(days)} else{
root_days = Math.floor(days)+1;}
days_count = root_days;
is the modulus good way of replacing parseInt here? It actually works this way, but when I put days%1<0.09 which is logical to me, it just doesn't work well, skips some hours actually.
Oh and I noticed I can use Math.ceil in place of second math.floor.