Basic Comparison Operators

Tinderbox Icon

Queries support 4 basic comparison operators:

v3.0.0 adds 2 new basic operators:

Comparing date (data type values) with the = operator. Agents regard two dates as being equal if they share the same year, month, and day — regardless of the time of day. This makes agent expressions that use the equality operator = useful. In past releases, equality looked only for identical time stamps, which was rarely what users expected.

For all other date comparisons, the time element of date-time attribute value is taken into account. Where no explicit time is set, the time defaults to '00:00'.

Note that the comparison operators >, >=, < and <= continue to compare both date and time. It is now possible, for example, for the same note to be discovered by two agents with different query operators, one that locates TheDate < today and another that searches for TheDate = today. If the TheDate has a time of 14:30 and today has a time of 11:00 then both queries will match; the first matches simple on a time agnostic whole-day basis, the second matches because 14:40 is later (greater) than 11:00.

The date parser accepts the following expressions as placeholders for calculated dates:

There is a further special case:

As from v 3.0.0, day placeholders Sunday, Monday, etc., may be used. Tinderbox recognises the day of the week (in English, currently) and interprets it as the day after today with that week day. Thus on Sunday June 1, the date "Sunday" refers to Sunday, June 8.

In other respects, days of the week act like today and can be modified similarly, e.g. Monday - 1 week is the previous Monday.

From v4.0.1, agent query comparison operations will accept expressions on their right-hand side. this Width>$Height*2 is legal.

Up: Agent Queries
  Next: Attribute Name 

[Last updated: 3 Dec 2008]

Google search aTbRef for:  

Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]

Creative Commons License

Made with Tinderbox