WP_Locale::get_meridiem() WordPress Method
The WP_Locale::get_meridiem() method is used to retrieve the correct meridiem for a given time. The method accepts two parameters: $hour and $minute. The $hour parameter is the hour to be converted, and the $minute parameter is the minute to be used in conjunction with the $hour parameter.
WP_Locale::get_meridiem( string $meridiem ) #
Retrieves translated version of meridiem string.
Description
The $meridiem parameter is expected to not be translated.
Parameters
- $meridiem
(string)(Required)Either 'am', 'pm', 'AM', or 'PM'. Not translated version.
Return
(string) Translated version
Source
File: wp-includes/class-wp-locale.php
public function get_meridiem( $meridiem ) { return $this->meridiem[ $meridiem ]; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |