本文整理汇总了PHP中DBConnection::format_date方法的典型用法代码示例。如果您正苦于以下问题:PHP DBConnection::format_date方法的具体用法?PHP DBConnection::format_date怎么用?PHP DBConnection::format_date使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBConnection
的用法示例。
在下文中一共展示了DBConnection::format_date方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
/**
* Save Product Purchase
*/
public function save()
{
$nextBillingDate = DBConnection::format_date($this->post['nextbillingdate']);
$this->get['ppurchase']->setTerm($this->post['term']->getTermLength());
$this->get['ppurchase']->setNextBillingDate($nextBillingDate);
$this->get['ppurchase']->setNote($this->post['note']);
update_ProductPurchaseDBO($this->get['ppurchase']);
// Success
$this->setMessage(array("type" => "[CHANGES_SAVED]"));
$this->reload();
}
示例2: save
/**
* Save Hosting Service Purchase
*/
public function save()
{
$nextBillingDate = DBConnection::format_date($this->post['nextbillingdate']);
$this->get['hspurchase']->setTerm($this->post['term']->getTermLength());
$this->get['hspurchase']->setNextBillingDate($nextBillingDate);
$this->get['hspurchase']->setDomainName($this->post['domain']);
$this->get['hspurchase']->setServerID($this->post['server']->getID());
$this->get['hspurchase']->setNote($this->post['note']);
update_HostingServicePurchaseDBO($this->get['hspurchase']);
// Success
$this->setMessage(array("type" => "[CHANGES_SAVED]"));
$this->reload();
}
示例3: incrementNextBillingDate
/**
* Increment Next Billing Date
*/
public function incrementNextBillingDate()
{
$nextBillingDateTS = DBConnection::date_to_unix($this->getNextBillingDate());
$oldBillingDate = getdate($nextBillingDateTS);
$nextBillingDate = DBConnection::format_date(mktime(0, 0, 1, $oldBillingDate['mon'] + $this->getTerm(), $oldBillingDate['mday'], $oldBillingDate['year']));
$this->setNextBillingDate($nextBillingDate);
return $nextBillingDate;
}