Currently, the data comparison condition has these operators, "is greater than / is less than / is equal to / contains." With date and time data, it is more intuitive to use "is before / is after / is on."

It would also be nice to have the option to use expressions like, "+5 days" and "<=5 min." These types of expressions could be similar to how in 6.x you can optionally use regex expressions instead of a token value in the second comparison field.

See also: #348731: Condition: date/time comparison.

Comments

fago’s picture

Title: Add date & time operators to data comparison condition » Improve the operator names for date comparisons
Component: Rules Core » Rules Engine

The operators are there, but I agree a more intuitive naming would make sense.

vkareh’s picture

For #348731: Condition: date/time comparison, I created the following patch: http://drupal.org/node/348731#comment-4172958

It's for Drupal 6.x, but it should be fairly easy to port. Should we mark this as duplicate?

fago’s picture

Status: Active » Closed (duplicate)

Doing a separate date-specific condition makes sense to me, in particular when we have additional features like the granularity stuff. Having that, I think we don't need to improve the generic comparison for dates.

mitchell’s picture

I'm not reopening this issue because there isn't anything actionable atm, but I just want to say that #3 is confusing. @fago, I believe what you're saying is that a separate date/time condition makes sense because we can use date/time specific operators. Otherwise, would it be a good design for data_comparison to use different op names based on input1's data type?