Resetting a variable value per day?


#1

I’m creating an addition to my website which checks to see if it has been updated at all.

I would like a variable to check to see if it has. How would I go about making an automatic reset for my variable per day?

Thanks.


#2

We implemented it on by storing time and date on every update and checking if this time-stamp is not to far behind. That way you don’t have to reset anything.


#3

No no, I mean. I’m creating a web app which needs regular inputs. I want to have an automatic check to see if there has been any inputs that day, or any changes at all. If there has been no change, then I wanted an input.

I said value because the only way I could think of doing it was by checking a variable against another.


#4

You could still store a timestamp on every input I think. We use [Ember Pouch] (https://github.com/nolanlawson/ember-pouch) which has rev by default. You can check this rev agains the rev from your yesterday check.


#5

I have not used it but you can also use https://github.com/iriscouch/follow with Pouch to monitor it on the server side.