transition time ranged queries to timeframe

This commit is contained in:
Gabe Farrell 2026-01-01 00:05:20 -05:00
parent ad3c51a70e
commit 24c101d35f
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()