WP_Locale::get_month_abbrev() WordPress Method
The WP_Locale::get_month_abbrev() method is used to get the abbreviated month for a given month number. This is useful for date/time displays where space is limited, such as in the sidebar of a WordPress site.
WP_Locale::get_month_abbrev( string $month_name ) #
Retrieves translated version of month abbreviation string.
Description
The $month_name parameter is expected to be the translated or translatable version of the month.
Parameters
- $month_name
(string)(Required)Translated month to get abbreviated version.
Return
(string) Translated abbreviated month.
Source
File: wp-includes/class-wp-locale.php
public function get_month_abbrev( $month_name ) { return $this->month_abbrev[ $month_name ]; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |