You are here

function _date_views_timestamp_argument_range_handler in Date 5

Same name and namespace in other branches
  1. 5.2 date/date_views.inc \_date_views_timestamp_argument_range_handler()

Flexible date range argument handler

Argument is based on ISO 8601 date duration and time interval standards

See http://en.wikipedia.org/wiki/ISO_8601#Week_dates for definitions of ISO weeks See http://en.wikipedia.org/wiki/ISO_8601#Duration for definitions of ISO duration and time interval

Argument expects a value like 2006-01-01--2006-01-15, or 2006-W24, or @P1W Separate from and to dates or date and period with a double hyphen (--)

From and to dates in argument are ISO dates, but can be shortened and missing parts will be added Omitted parts of ISO dates will be assumed to be the first possible (for the from date) or the last possible (for the to date) value in that time period

The 'to' portion of the argument can be eliminated if it is the same as the 'from' portion Use @ instead of a date to substitute in the current date and time.

Use periods (P1H, P1D, P1W, P1M, P1Y) to get next hour/day/week/month/year from now Use date before P sign to get next hour/day/week/month/year from that date

This module does not currently handle the option of using a period with an end date, only a start date followed by a period.

The groupby selector values are used only if a summary view of the argument is requested possible values are by year, by month, by week, by day, and by hour

if summaries are used, navigating to the view with no argument will display subtotals for the query, grouped by the selected range, with a link to the complete query for each range

1 call to _date_views_timestamp_argument_range_handler()
date_views_timestamp_argument_range_handler in ./date.module

File

./date_views.inc, line 274

Code

function _date_views_timestamp_argument_range_handler($op, &$query, $argtype, $arg = '') {

  // this is just a wrapper function that sets the date type
  return _date_views_argument_range_handler($op, $query, $argtype, $arg, 'int');
}