WP_Locale::get_month

SummerySummery

Retrieve the full translated month by month number.

Syntax

WP_Locale::get_month( string|int $month_number )

DescriptionDescription

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.

ParametersParameters

$month_number

(string|int) (Required) '01' through '12'.

ReturnReturn

(string) Translated full month name.

SourceSource

File: wp-includes/class-wp-locale.php


			

ChangelogChangelog

Changelog
Version Description
2.1.0 Introduced.
Scroll to Top