Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get weekstartend

This page redirects to an external site: https://developer.wordpress.org/reference/functions/get_weekstartend/

Description

Get the week start and end from the MySQL DATETIME or date string.

Usage

<code style="color: #000000"><span style="color: #0000BB"><?php get_weekstartend</span><span style="color: #007700">( </span><span style="color: #0000BB">$mysqlstring</span><span style="color: #007700">, </span><span style="color: #0000BB">$start_of_week </span><span style="color: #007700">) </span><span style="color: #0000BB">?></span></code>

Parameters

$mysqlstring
(string) (required) Date or MySQL DATETIME field type.
Default: None
$start_of_week
(integer) (optional) Start of the week as an integer.
Default: ''

Return Values

(array) 
Keys are 'start' and 'end'.

Examples

Notes

  • Uses: get_option() to retrieve the 'start_of_week' option if $start_of_week is not numeric.

Change Log

Since: 0.71

Source File

get_weekstartend() is located in wp-includes/functions.php.

Related

See also index of Function Reference and index of Template Tags.