|
Posted by larry on 01/01/08 03:31
On Dec 31, 8:28 am, ashore <shor...@gmail.com> wrote:
> Feature or bug, that's pretty bad (where 'bad' == 'non-intuitive').
>
> While correcting this will prbly break a lot of applications, mebbe
> it's time for another date set of functions.
>
> What DO you guys use to 'go back one month' reliably?
>
> -AS
I use 1 as the day, if I want to find the last month, or a simple
$lastmonth = ($curmonth == 1,12, $curmonth -1);
The date with mktime is great for calculating out an arbitrary date
such as add 30 days to the current date, etc. It's not a bug, but a
great feature, if you understand how it works.
Here is some date arithmetic I posted that uses mktime, just to give
you an idea.
http://groups.google.com/group/comp.lang.php/browse_frm/thread/c8637f47a9537ff3/f3d94e81f2ec396a
Navigation:
[Reply to this message]
|