On this page
WP_Locale::get_weekday( int $weekday_number ): string
Retrieves the full translated weekday word.
Description
Week starts on translated Sunday and can be fetched by using 0 (zero). So the week starts with 0 (zero) and ends on Saturday with is fetched by using 6 (six).
Parameters
$weekday_numberint Required-
0 for Sunday through 6 Saturday.
Return
string Full translated weekday.
Source
File: wp-includes/class-wp-locale.php. View all references
public function get_weekday( $weekday_number ) {
return $this->weekday[ $weekday_number ];
}
Related
Used By
| Used By | Description |
|---|---|
| wp_date() wp-includes/functions.php | Retrieves the date, in localized format. |
| the_weekday() wp-includes/general-template.php | Displays the weekday on which the post was written. |
| the_weekday_date() wp-includes/general-template.php | Displays the weekday on which the post was written. |
| get_calendar() wp-includes/general-template.php | Displays calendar with days that have posts as links. |
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_locale/get_weekday