rcp19, dates, and timestamps #108
bryanburgers
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The original specification for RCP19 seem to indicate that "dates" and "times" are synonymous.
https://github.com/RESOStandards/reso-transport-specifications/files/8384860/RESOWebAPIRCP-RCP-WEBAPI-019ValidationExpressionintheWebAPI-300322-2353.pdf
In practice, MLSes that return RESO values clearly differentiate between
2023-04-212023-04-21T12:34:56.135Zif we're lucky, or2023-04-21T12:34:56.135I'd like to see the RCP19 spec clearly differentiate between these two types.
Especially, the spec defines addition and subtraction between times and floats.
Where the float seems to indicate a number of days.
For timestamps, specifying a time shift as a float (some fraction of a day) is fine. For dates, specifying a time shift as some fraction of a day doesn't make sense.
E.g., if the contractual OnMarketDate is
2023-04-21, what doesOnMarketDate + 0.5evaluate to?2023-04-21because we add less than one day?2023-04-22?2023-04-21T12:00:00Zassumes the the contractual date is midnight UTC, which isn't ideal.Converting the date to a timestamp and doing the addition also doesn't always make sense; If the OnMarketDate just happens to be near the DST boundary, adding one full day (86400 seconds) might result in an off-by-one error.
https://rules.zenlist.dev/?gist=00baa24bce05326377f0d9729bbbd69f
Beta Was this translation helpful? Give feedback.
All reactions