transition time ranged queries to timeframe (#117)

This commit is contained in:
Gabe Farrell 2026-01-01 01:56:16 -05:00 committed by GitHub
parent ad3c51a70e
commit d327729bff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 2032 additions and 335 deletions

View file

@ -3,6 +3,9 @@ package db_test
import (
"testing"
"time"
"github.com/gabehf/koito/internal/db"
"github.com/stretchr/testify/require"
)
func TestListenActivityOptsToTimes(t *testing.T) {
@ -21,6 +24,11 @@ func eod(t time.Time) time.Time {
return time.Date(year, month, day, 23, 59, 59, 0, loc)
}
func TestPeriodUnset(t *testing.T) {
var p db.Period
require.True(t, p.IsZero())
}
func bod(t time.Time) time.Time {
year, month, day := t.Date()
loc := t.Location()