the_weekday()
Displays the localized weekday for the post.
Hooks from the function
Returns
null. Nothing (null).
Usage
the_weekday();
Notes
- Global. WP_Locale.
$wp_localeWordPress date and time locale object.
Changelog
| Since 0.71 | Introduced. |
the_weekday() the weekday code WP 6.9.1
function the_weekday() {
global $wp_locale;
$post = get_post();
if ( ! $post ) {
return;
}
$the_weekday = $wp_locale->get_weekday( get_post_time( 'w', false, $post ) );
/**
* Filters the localized weekday of the post, for display.
*
* @since 0.71
*
* @param string $the_weekday
*/
echo apply_filters( 'the_weekday', $the_weekday );
}