Add Carbon::quarter_string
This commit is contained in:
parent
4b25f97314
commit
a4650f8710
@ -15,10 +15,13 @@ class Carbon extends CarbonBase
|
||||
|
||||
public function __get($name)
|
||||
{
|
||||
switch (true) {
|
||||
case $name === 'half':
|
||||
switch ($name) {
|
||||
case 'half':
|
||||
return (int) ceil($this->month / static::MONTHS_PER_HALF);
|
||||
|
||||
case 'quarter_string':
|
||||
return sprintf('%dQ%d',$this->year,$this->quarter);
|
||||
|
||||
default:
|
||||
return parent::__get($name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user