Relative Time Formats

Xano uses relative time formats from php.net.

You can use these relative time formats alongside Timestamp Filters.

For example: now, last Monday, +7 days, etc. (Relative times normally don’t have any timezone information, so it will often be important to reference the timezone in any type of filter.)

FormatDescriptionExamples

'yesterday'

Midnight of yesterday

"yesterday 14:00"

'midnight'

The time is set to 00:00:00

'today'

The time is set to 00:00:00

'now'

Now - this is simply ignored

'noon'

The time is set to 12:00:00

"yesterday noon"

'tomorrow'

Midnight of tomorrow

'back of' hour

15 minutes past the specified hour

"back of 7pm", "back of 15"

'front of' hour

15 minutes before the specified hour

"front of 5am", "front of 23"

'first day of'

Sets the day of the first of the current month. This phrase is usually best used together with a month name following it as it only effects the current month

"first day of January 2008"

'last day of'

Sets the day to the last day of the current month. This phrase is usually best used together with a month name following it as it only effects the current month

"last day of next month"

ordinal space dayname space 'of'

Calculates the x-th week day of the current month.

"first sat of July 2008"

'last' space dayname space 'of'

Calculates the last week day of the current month.

"last sat of July 2008"

number space? (unit | 'week')

Handles relative time items where the value is a number.

"+5 weeks", "12 day", "-7 weekdays"

(ordinal | reltext) space unit

Handles relative time items where the value is text. last and previous are equivalent to -1, this to nothing, and next to +1.

"fifth day", "second month", "last day", "previous year"

'ago'

Negates all the values of previously found relative time items.

"2 days ago", "8 days ago 14:00", "2 months 5 days ago", "2 months ago 5 days", "2 days ago"

dayname

Moves to the next day of this name. (See note)

"Monday"

reltext space 'week'

Handles the special format "weekday + last/this/next week".

"Monday next week"

Note:

Relative statements are always processed after non-relative statements. This makes "+1 week july 2008" and "july 2008 +1 week" equivalent.

Exceptions to this rule are: "yesterday", "midnight", "today", "noon" and "tomorrow".

Note that "tomorrow 11:00" and "11:00 tomorrow" are different. Considering today's date of "July 23rd, 2008" the first one produces "2008-07-24 11:00" where as the second one produces "2008-07-24 00:00". The reason for this is that those five statements directly influence the current time.

Keywords such as "first day of" depend on the context in which the relative format string is used.

Last updated