From 26cd580053fba994f940c94795234cdc0f05e96c Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Sun, 26 Apr 2026 00:49:39 +0000 Subject: [PATCH] docs(prime): add RecordedTime date example and warn that Day is null for servings The gocronometer ServingRecord struct exposes a Day field in JSON output that is always null. Add a GOTCHA note directing users to RecordedTime for date-based jq filtering, and add a concrete date-filter recipe using RecordedTime | startswith(...) to match the biometrics sort_by pattern. Fixes #25 Co-authored-by: Darrell --- cmd/prime.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/prime.go b/cmd/prime.go index 18ced95..6185082 100644 --- a/cmd/prime.go +++ b/cmd/prime.go @@ -91,6 +91,9 @@ EXAMPLES # All foods from today's breakfast crono-export servings --since today --format json | jq '[.[] | select(.Group == "Breakfast") | .FoodName]' + # All servings on a specific day + crono-export servings --since 7d --format json | jq '[.[] | select(.RecordedTime | startswith("2026-04-25"))]' + # Latest weight reading in a 30-day window crono-export biometrics --since 30d --format json | jq 'map(select(.Metric == "Weight")) | sort_by(.RecordedTime) | last' @@ -103,6 +106,8 @@ GOTCHAS every column (including zeros), use --format json. - Cronometer logs by calendar day; nothing here is real-time. Two '--since today' calls moments apart return the same data. + - 'servings' JSON rows contain a 'Day' field that is always null — use + 'RecordedTime' (an ISO-8601 timestamp) for any date-based filtering. ` var primeCmd = &cobra.Command{