Merge pull request #3091 from bexarcreativeinc/4.1

[Proposal] Add format parameter to Form::selectMonth
This commit is contained in:
Taylor Otwell committed 2014-05-30 11:23:09 -05:00
commit 28c823383c
1 file changed
+3 -2
+3 -2
View File
@@ -470,15 +470,16 @@ class FormBuilder {
* @param string $name
* @param string $selected
* @param array $options
* @param string $format
* @return string
*/
public function selectMonth($name, $selected = null, $options = array())
public function selectMonth($name, $selected = null, $options = array(), $format = '%B')
{
$months = array();
foreach (range(1, 12) as $month)
{
$months[$month] = strftime('%B', mktime(0, 0, 0, $month, 1));
$months[$month] = strftime($format, mktime(0, 0, 0, $month, 1));
}
return $this->select($name, $months, $selected, $options);