Semantic MediaWiki and related extensions
|
Static Public Member Functions | |
static | registerFunctions (&$parser) |
static | runCalendarStartDate (&$parser, $calendar_type='month', $calendar_start_day=null, $calendar_days=7, $default_year=null, $default_month=null, $default_day=null) |
static | runCalendarEndDate (&$parser, $calendar_type='month', $calendar_start_day=null, $calendar_days=7, $default_year=null, $default_month=null, $default_day=null) |
static | getBoundaryDates ( $calendar_type='month', $calendar_start_day=null, $calendar_days=7, $default_year=null, $default_month=null, $default_day=null) |
Parser functions for the Semantic Result Formats extension.
Two parser functions are defined, both for use by the Calendar format:
#calendarstartdate returns the start date for the set of dates being displayed on the screen, according to the query string.
#calendarenddate returns the day after the end date for the set of dates being displayed on the screen, according to the query string.
|
static |
Obtain both a lower- and upper- bound date to be used for querying.
$calendar_type | string Values: 'month' (the default) for monthly calendar such as SRF Calendar; others not yet defined. |
$calendar_start_day | int Optionally force the lower bound date to be a certain day of the week (0 for Sunday, 6 for Saturday). If using a $calendar_type of 'month' this parameter is ignored, as the start day of week for a monthly calendar is currently always set as Sunday. Ohterwise defaults to either the day supplied in the query string, or the current day. |
$calendar_days | int The number of days to display. Ignored if using a $calendar_type of 'month'; otherwise defaults to 7. |
$default_year | int (Optional) Default year if none is specified in the query string. If parameter is not supplied, will fall back to current year. |
$default_month | int (Optional) Default month if none is specified in the query string. If parameter is not supplied, will fall back to current month. |
$default_day | int (Optional) Default day of month if none is specified in the query string. If parameter is not supplied, will fall back to current day of month. |