Add format parameter to Form::selectMonth

This commit is contained in:
Daniel LaBarge committed 2013-12-30 16:41:46 -06:00
1 parent 2e4651f827
commit 99083190d0
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);