How many months between two dates?
Depending on what you mean by “how many months”, this could work.
[php]
$months = intval((strtotime($time2) – strtotime($time1)) / (60*60*24*30));
[/php]
That is, the number of seconds between those two dates divided by the number of seconds in a month (where month is normalized to 30 days).
To calculate the number of months from today to some point back in time:
[php]
$months = intval((strtotime(date(‘Y-m-d’)) – strtotime($time1)) / (60*60*24*30));
[/php]
Random Posts
Twitter Feed
- No public Twitter messages.
Tags
android aweber backup book clubrunner dacdb email marketing facebook fbi foursquare functions gmail gmail filters gmail signatures google google buzz iPad iphone linkedin linux Local Marketing myspace newsletter openoffice os x polio plus prescott az prescott enews prescott young professionals press releases projects ratepoint Rotary Club search security seo social social media techcrunch tweetdeck twitter website speed windows wonderhowto wordpressSigma Web Technologies








