Jump to content

monthly - reset count


gcue
 Share

Recommended Posts

i am trying to track down my monthly minutes for a calling plan i have.

everytime i enter X minutes into a script it deducts X amount from the grand total of 2000 (which i am alotted per month.)

my plan resets the minute count every 22nd of every month. in a perfect world, i can open the program every month on the 22nd, but what happens if i dont open it on that day? how can i tell the script to reset the count?

i was thinking the following:

track the day when it last resets. (write a date stamp in an ini file)

then

if @mday = 22 and _datediff($today, $last_reset) > 28 then RESET (rewrite last reset date)

but that will keep resetting trailing days if the month has more than 28 days

please help!

Edited by gcue
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...