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.


Top ↑

Parameters

$meridiem

(string)(Required)Either 'am', 'pm', 'AM', or 'PM'. Not translated version.


Top ↑

Return

(string) Translated version


Top ↑

Source

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

	public function get_meridiem( $meridiem ) {
		return $this->meridiem[ $meridiem ];
	}


Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.