I am working on some a math issue that is driving me nuts.
I have a record in a database. At some point from the time my account begins (noted as the time() of my database record being created) I decide to be removed from this database -- I wish to note this on the record (ie: set a REMOVE field to YES), and calculate from the initial account creation when to remove the record from my table at the end of the current 7 day period this request was made.
So I create my record today and insert the time(). 16 days later I decide to remove the record at the end of the current weeks activity -- the account should get removed after the 21st day since my record was created (the account staying active til the end of the current week during which removal was requested). How do I determine the proper time() for the 21st day (or, rather, end of the THIRD WEEK) since the account was opened?
Any ideas?
Thanks!
Kev