/*
豆腐製作  都是精品
http://www.asp888.net 豆腐技術站
如轉載 請保留完整著作權資訊
*/

function CheckRun(\$year){
if(\$year%4==0 && (\$year%100!=0 || \$year%400==0) )
return true;
else
return false;
}

\$parts = explode(' ', \$date);
\$date = \$parts[0];
\$time = \$parts[1];
\$ymd = explode('-', \$date);
\$hms = explode(':', \$time);
\$year = \$ymd[0];
\$month = \$ymd[1];
\$day = \$ymd[2];
\$hour = \$hms[0];
\$minute = \$hms[1];
\$second = \$hms[2];
\$day=\$day+1 ;   //廢話少說，先把日期加一再說
if(\$month=='1' || \$month=='3' || \$month=='5' || \$month=='7' || \$month=='8' || \$month=='10' || \$month=='12')
if(\$day==32)
{
\$day='1';
\$month++;
}
if(\$month=='4' || \$month=='6' || \$month=='9' || \$month=='11')
if(\$day==31)
{
\$day='1';
\$month++;
}
if(\$month=='2')
if(CheckRun(\$year))
{
//閏年 2月有 29 天
if(\$day==30)
{
\$day=1;
\$month++;
}
}
else
{
//不是閏年
if(\$day==29)
{
\$day=1;
\$month++;
}
}
if(\$month==13)
{
\$month=1;
\$year++;
}
return \$year . "-" . \$month . "-" . \$day;
}

## E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

## Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

## Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth \$300-1200 USD