Title: WP_Locale::get_month_genitive
Published: April 28, 2025
Last modified: May 20, 2026

---

# WP_Locale::get_month_genitive( string|int $month_number ): string

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#wp--skip-link--target)

Retrieves translated version of month genitive string.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#description)󠁿

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.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#parameters)󠁿

 `$month_number`string|intrequired

`'01'` through `'12'`.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#return)󠁿

 string Translated genitive month name.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#source)󠁿

    ```php
    public function get_month_genitive( $month_number ) {
    	return $this->month_genitive[ zeroise( $month_number, 2 ) ];
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-locale.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/class-wp-locale.php#L359)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-locale.php#L359-L361)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#related)󠁿

| Uses | Description | 
| [zeroise()](https://developer.wordpress.org/reference/functions/zeroise/)`wp-includes/formatting.php` |

Add leading zeros when necessary.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_locale/get_month_genitive/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.8.0](https://developer.wordpress.org/reference/since/6.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_locale%2Fget_month_genitive%2F)
before being able to contribute a note or feedback.