Skip to content

Commit 2e94d16

Browse files
author
Raphael Petrini
committed
fix issue #11
1 parent 433f512 commit 2e94d16

File tree

1 file changed

+2
-2
lines changed
  • src/app/code/community/Hackathon/PromoCodeMessages/Model

1 file changed

+2
-2
lines changed

src/app/code/community/Hackathon/PromoCodeMessages/Model/Validator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ protected function _validateGeneral($rule, $coupon)
152152
// check from date
153153
if ($rule->getFromDate()) {
154154
$fromDate = new Zend_Date($rule->getFromDate(), Varien_Date::DATE_INTERNAL_FORMAT);
155-
if ($now->isEarlier($fromDate)) {
155+
if ($now->isEarlier($fromDate, Zend_Date::DATE_MEDIUM)) {
156156
Mage::throwException($this->_formatMessage(
157157
'Your coupon is not valid yet. It will be active on %s.',
158158
Mage::helper('core')->formatDate($fromDate, Mage_Core_Model_Locale::FORMAT_TYPE_LONG),
@@ -164,7 +164,7 @@ protected function _validateGeneral($rule, $coupon)
164164
// check to date
165165
if ($rule->getToDate()) {
166166
$toDate = new Zend_Date($rule->getToDate(), Varien_Date::DATE_INTERNAL_FORMAT);
167-
if ($now->isLater($toDate)) {
167+
if ($now->isLater($toDate, Zend_Date::DATE_MEDIUM)) {
168168
Mage::throwException($this->_formatMessage(
169169
'Your coupon is no longer valid. It expired on %s.',
170170
Mage::helper('core')->formatDate($toDate, Mage_Core_Model_Locale::FORMAT_TYPE_LONG),

0 commit comments

Comments
 (0)