You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've captured two dates and want to assert that one is earlier than the other, but I get a type error:
65 | jsonpath "$.results[0].created_at" toDate "%+" format "%a, %d %b %Y %H:%M:%S" toDate "%a, %d %b %Y %H:%M:%S" < {{ request_date }}
| actual: date <2024-12-04 17:54:52 UTC>
| expected: less than date <2024-12-04 18:26:57 UTC>
| >>> types between actual and expected are not consistent
I see that https://hurl.dev/docs/filters.html#daysbeforenow is one filter, but I need something on the order of seconds rather than days, so perhaps a secondsBeforeNow filter could be used for both dates (or in my case I can just hardcode a value of 5 seconds).
The text was updated successfully, but these errors were encountered:
Problem to solve
I've captured two dates and want to assert that one is earlier than the other, but I get a type error:
Proposal
Expand the comparison predicates (e.g. https://hurl.dev/docs/grammar.html#less-predicate) to allow dates as well as the current numbers and strings.
Relates somewhat to #798
Alternatives
I see that https://hurl.dev/docs/filters.html#daysbeforenow is one filter, but I need something on the order of seconds rather than days, so perhaps a
secondsBeforeNow
filter could be used for both dates (or in my case I can just hardcode a value of 5 seconds).The text was updated successfully, but these errors were encountered: