Function __global->get_week_number_for
Definitions
sources/calendar.php
- Get the week number for a time.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $timestamp | TIME | No | No | required parameter | N/A | N/A | The week timestamp |
| $within_year | boolean | No | No | False | N/A | N/A | Whether to do it contextually to the year, rather than including the year |
Returns
- The week number
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the week number for a time.
*
* @param TIME $timestamp The week timestamp
* @param boolean $within_year Whether to do it contextually to the year, rather than including the year
* @return string The week number
*/
function get_week_number_for(int $timestamp, bool $within_year = false) : string
* Get the week number for a time.
*
* @param TIME $timestamp The week timestamp
* @param boolean $within_year Whether to do it contextually to the year, rather than including the year
* @return string The week number
*/
function get_week_number_for(int $timestamp, bool $within_year = false) : string
