date-time
date-time copied to clipboard
LocalDateRange::toInterval
Converting LocalDateRange to Interval is a common task in my app. Typically, I have a method to generate reports that expects a LocalDateRange argument. Subsequently, I need to transform it for SQL queries using the BETWEEN operator. It’s important to note that the timezone in my database differs from the implied timezone in LocalDateRange.
The new method introduced will transform any LocalDateRange into an Interval in the specified timezone.