WP_Locale::get_month_genitive()
Retrieves translated version of month genitive string.
The $month_number parameter has to be a string because it must have the '0' in front of any number that is less than 10. Starts from '01' and ends at '12'.
You can use an integer instead and it will add the '0' before the numbers less than 10 for you.
Method of the class: WP_Locale{}
No Hooks.
Return
String
. Translated genitive month name.
Usage
global $wp_locale; $wp_locale->get_month_genitive( $month_number );
- $month_number(string|int) (required)
- '01' through '12'.
Changelog
Since 6.8.0 | Introduced. |
WP_Locale::get_month_genitive() WP Locale::get month genitive code WP 6.8
public function get_month_genitive( $month_number ) { return $this->month_genitive[ zeroise( $month_number, 2 ) ]; }