Opened 17 months ago
Last modified 17 months ago
#58658 new enhancement
WP_Locale add get_month_genitive() method
Reported by: | Tkama | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | minor | Version: | 4.4 |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
The WP_Locale
class has get_month()
and get_month_abbrev()
methods, but does not have get_month_genitive()
. It should be there as well.
We should add such a code:
/** * Retrieves the full translated month in genitive case by month number. * * @since 6.2.3 * * @param string|int $month_number From 1 to 12. If a number less than 10 is * passed in integer or string format, a '0' will be added before it. * * @return string Translated full month name in genitive case. */ public function get_month_genitive( $month_number ) { return $this->month_genitive[ zeroise( $month_number, 2 ) ]; }
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
Thanks for the ticket! Setting the version to 4.4 as per [35517] / #11226.