The current help text for the date filter is incorrect for the date offset filter type. Currently, it is 'An offset from the current time such as "+1 day" or "-2 hours and 30 minutes"'. However, entering '-2 hours and 30 minutes' does not work! It appears that it should actually be '-2 hours -30 minutes'.

('-2 hours 30 minutes' (i.e. without the 'and') is intepreted as only 90 minutes ago, rather than the expected 150 minutes ago.)

See the attached patch to correct this, swapping '-2 hours and 30 minutes' for '-2 hours -30 minutes', including those in the translation files.

CommentFileSizeAuthor
views-date-offset-text.patch7.37 KBjames.williams

Comments

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine.

Tested

dsm(strtotime("-2 hours and 30 minutes"));
dsm(strtotime("-2 hours 30 minutes"));

Only the second does return something.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed to all branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.