in reply to How Many Days in the Past?
b) month from localtime is actually 0 based, i.e. january is month 0. So you need to add one or it will be wrong in your code... that may very well be your problem.
Update point a... or are you using that to get midnight, of today? in any case you need to add one to the month :)
- Ant
|
|---|