The DST-safe algorithm I use for calculating the daydate of yesterday or other relative date descriptions is to add/subtract 22 hours from the current gmtime() or localtime() until the date or day of week changes - this is a much simpler (and easier to debug) loop than maintaining any carry.
In reply to Re^2: Date Manipulation
by Corion
in thread Date Manipulation
by SR
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |