Replies: 1 comment
-
@finnbear I've added an issue for this: #1213. Given that:
Let's get rid of it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
SurrealDB implements division for datetime divided by duration:
select time::now() / 1w
, which truncates the datetime to the duration.The implementation of the feature is questionable because:
v
andw
are reversed here (should bev
/w
):surrealdb/lib/src/sql/value/value.rs
Line 1234 in 5fe1fd0
The feature itself is questionable because:
surrealdb/lib/src/sql/duration.rs
Lines 207 to 218 in 5fe1fd0
time::floor
seems like a canonical, much more clear way to truncate datetimesMy idea is to either:
v
andw
in the implementationThoughts?
Beta Was this translation helpful? Give feedback.
All reactions