예제 #1
0
    /**
     * @throws Gpf_DbEngine_NoRowException
     * @param $accountId
     * @return String
     */
    public function getNextInvoiceDateFrom($accountId) {
		$lastInvoiceDateTo = $this->getLastInvoiceVariable($accountId, self::DATE_TO);
		$date = new Gpf_DateTime($lastInvoiceDateTo);
        $date->addDay(1);
        return $date->getDayStart()->toDateTime();
    }
	private function formatTransactionDate($created){
		$createdStamp = Gpf_Common_DateUtils::getTimeStamp($created);
		$datetime = new Gpf_DateTime();
		$today = $datetime->getDayStart();
		$yesterday = $datetime->getDayStart();
		$yesterday->addDay(-1);

		if($createdStamp >= $today->toTimeStamp()){
			return $this->_("today");
		}
		if($createdStamp >= $yesterday->toTimeStamp()){
			return $this->_("yesterday");
		}
		return Gpf_Common_DateUtils::getDate($createdStamp);
	}