Kamis, 23 Februari 2012

Pengurangan DateTime di PHP

http://php.net/manual/en/datetime.sub.php

http://www.php.net/manual/en/class.dateinterval.php

$date = new DateTime('2000-01-20');$date->sub(new DateInterval('P10D'));
echo 
$date->format('Y-m-d') . "\n";


or


<?php
$signupdate 
strtotime('2010-05-01 15:03:50');$thirtydaysago strtotime('-30 days');

if(
$signupdate $thirtydaysago){
  
#new member}?>

1 komentar:

  1. A Beginner's Guide to Gambling and Online Gambling in the USA
    Gambling is the biggest gambling problem in the US and many places. In some cases, it can't help but convert youtube video to mp3 be a problem, and many

    BalasHapus