WordPress.org

Ready to get started?Download WordPress

Codex

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

Function Reference/get weekstartend

Description

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

Usage

<?php get_weekstartend$mysqlstring$start_of_week ?>

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.