Giorgi / DuckDB.NET

Bindings and ADO.NET Provider for DuckDB
https://duckdb.net
MIT License
339 stars 61 forks source link

Explicit operator for DuckDBInterval to TimeSpan #111

Closed Seddryck closed 1 year ago

Seddryck commented 1 year ago

I was wondering if it would make sense for you if I'd submit a PR to add an explicit operator for DuckDBInterval to transform it into a TimeSpan. I won't implement an implicit operator as the DuckDBInterval is richer than the TimeSpan type (regarding the capability to define an interval based on months/years).

I could also add the reverse operators (from TimeSpan to DuckDBInterval) and in that case, both the implicit and explicit operators.