edgedb / rfcs

RFCs for major changes to EdgeDB
Apache License 2.0
35 stars 5 forks source link

RFC 1013: Date/time arithmetic. #59

Closed vpetrovykh closed 2 years ago

vpetrovykh commented 2 years ago

Add subtraction operator - for all "local" date/time scalars.

Add helper funcitons for normalizing relative_duration and for extracting its various components.

vpetrovykh commented 2 years ago

I've added relative_delta as a way to expose age from Postgres as it represents a very useful wayof performing subtraction of local_date/local_datetime values.

I've also updated the int/float analogy for the new arithmetic. This potentially adds a backwards-incompatible change for +.