monthName() public static method

Return the translation to a specific week day
public static monthName ( integer $month, boolean $abbr = false, array $options = [] ) : string
$month integer 1..12
$abbr boolean (if abbreviation should be returned)
$options array - appendDot (only for 3 letter abbr; defaults to false)
return string translatedText
示例#1
0
 /**
  * TimeTest::testMonth()
  *
  * @return void
  */
 public function testMonthName()
 {
     //$this->out($this->_header(__FUNCTION__), true);
     $ret = $this->Time->monthName('11');
     $this->assertEquals(__d('tools', 'November'), $ret);
     $ret = $this->Time->monthName(1);
     $this->assertEquals(__d('tools', 'January'), $ret);
     $ret = $this->Time->monthName(2, true, ['appendDot' => true]);
     $this->assertEquals(__d('tools', 'Feb') . '.', $ret);
     $ret = $this->Time->monthName(5, true, ['appendDot' => true]);
     $this->assertEquals(__d('tools', 'May'), $ret);
 }