Skip to content
Permalink
Browse files

#354 - adding missing default values for the Date::monthName attribute

  • Loading branch information
alphadevx committed Oct 16, 2019
1 parent ac0cef7 commit e4e339c2d3d03a026a753a4283ee8f5c0b9516d1
Showing with 3 additions and 1 deletion.
  1. +3 −1 Alpha/Model/Type/Date.php
@@ -14,7 +14,7 @@
*
* @author John Collins <dev@alphaframework.org>
* @license http://www.opensource.org/licenses/bsd-license.php The BSD License
* @copyright Copyright (c) 2018, John Collins (founder of Alpha Framework).
* @copyright Copyright (c) 2019, John Collins (founder of Alpha Framework).
* All rights reserved.
*
* <pre>
@@ -135,6 +135,7 @@ public function __construct($date = '')
$this->month = date('m');
$this->day = date('d');
$this->weekday = date('l');
$this->monthName = date('F');
} else {
$this->year = '0000';
$this->month = '00';
@@ -199,6 +200,7 @@ public function setDateValue($year, $month, $day)
$this->day = str_pad($day, 2, '0', STR_PAD_LEFT);
$unixTime = mktime(0, 0, 0, $this->month, $this->day, $this->year);
$this->weekday = date('l', $unixTime);
$this->monthName = date('F', $unixTime);
}
}

0 comments on commit e4e339c

Please sign in to comment.
You can’t perform that action at this time.