bug in the timealarm library

sorry mem, not that I want to argue with you, but I think you missed my point :slight_smile:
I continue to think that the

Mode.isEnabled = 0; // values more than a week but less than today have expired so the alarm is disabled

will never be run (and that the previous 'if' statement is useless) could you check the simplification of the code made below ?

    if( value > SECS_PER_WEEK )
      { ... }
      else //VIK: value <= SECS_PER_WEEK for all the command within the else statement (MARKED as an X) 
   X   {
   X     if ( value <= SECS_PER_DAY)
   X     { ... }
   X     else //VIK: value > SECS_PER_DAY
   X     {
   X       if ( value <= SECS_PER_WEEK)  //VIK: this condition is always true and useless (IMHO)
   X       {  ...  }
   X     }
   X   }

Best regards.

P.S.

I will upgrade the code in the playground once we sort this out :slight_smile: