add quarter format

This commit is contained in:
Ehsan Sabet committed 2021-11-10 12:11:00 +03:30
1 parent 75a9713ed2
commit fe6b056b52
8 files changed
+48 -1

No files matched your search

+6 -1
View File
@@ -134,7 +134,10 @@ trait Formatting
case 't':
return static::isLeapYear( $pYear ) && ( $pMonth == 12 ) ? 30 : static::$daysMonthJalali[ intval( $pMonth ) - 1 ];
# Quarter
case 'Q':
case 'q':
return self::$messages['quarters'][$this->quarter];
# Years
case 'L':
return intval( $this->isLeapYear( $pYear ) );
@@ -291,6 +294,8 @@ trait Formatting
"%n" => "\n",
"%t" => "\t",
"%%" => "%",
"%Q" => "q",
"%q" => "q"
);
return str_replace(array_keys($strftime_date), array_values($strftime_date), $format);