caculating dates with php
<p>I have a general question on calculating dates with php.</p>

<p>What happens if I store a timestamp like this in my database:</p>

<pre><code>$db_timestamp = '2010-01-31 00:00:00';
</code></pre>

<p>and then run a daily script that checks if a month has passed since the timestamp was saved in the database:</p>

<pre><code>if ($db_timestamp == make_unix_timestamp(mktime(0, 0, 0, date("m") - 1, date("d"), date("Y")), TRUE, 'eu'))) 
{ 
    do something 
};
</code></pre>

<p>my problem is that i just realized that this wouldn't work for all dates. in this case 'do something' would not be called in February, since February doesn't have a 31st day. any idea on how to implement something like that?</p>
