The Date filter does not work with relative dates. strtotime is being called with the second parameter set to "0"

$value = intval(strtotime($this->value['value'], 0));
$value = new DateObject($value);

This means that any relative dates will be computed relative to the start of unix time. I have no idea if there is some legitimate use for this, but I think this was not intended.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MiroslavBanov’s picture

Status: Active » Needs review
FileSize
1.05 KB

Patch attached.

boyan.borisov’s picture

Status: Needs review » Reviewed & tested by the community

works for me

  • MiroslavBanov committed 20c3a87 on 7.x-1.x
    Issue #2191157: Date filter does not work with relative date
    
MiroslavBanov’s picture

Status: Reviewed & tested by the community » Fixed

Fixed.

Status: Fixed » Closed (fixed)

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