فهرست منبع

docs: document CHEAPO_CLI_OUTPUT_DATE_FORMAT; keep ISO for JSON/MCP

Paul Klumpp 2 روز پیش
والد
کامیت
56516fea0b
2فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 6 1
      .env.example
  2. 3 2
      AGENTS.md

+ 6 - 1
.env.example

@@ -11,4 +11,9 @@ CHATTO_TOKEN="<token>"               # set by the operator
 #   January 2, 2006     -> December 31, 2026
 # Reference: https://pkg.go.dev/time#Time.Format
 # CHEAPO_DATE_FORMAT=2006-01-02
-CHEAPO_DATE_FORMAT=02.01.2006
+CHEAPO_DATE_FORMAT=02.01.2006
+
+# Date format for CLI 'Free until:' output (Go time layout). Default: RFC3339 (ISO, unambiguous).
+# JSON output and MCP always use ISO-8601 regardless of this setting.
+# CHEAPO_CLI_OUTPUT_DATE_FORMAT=2006-01-02
+CHEAPO_CLI_OUTPUT_DATE_FORMAT=2006-01-02T15:04:05Z07:00

+ 3 - 2
AGENTS.md

@@ -99,8 +99,9 @@ How it gets the info:
 - **Unambiguous date outputs:** prefer ISO-8601 (RFC-3339 / `2006-01-02`)
   for machine-readable/structured surfaces (CLI `--json`, MCP `offer` wire type);
   compact locale-style formats (e.g. `02.01.`) are only for human-facing chat
-  messages and must be overridable via `CHEAPO_DATE_FORMAT`. Avoid ambiguous
-  `DD.MM.`/`MM/DD` outputs without a year.
+  messages and must be overridable via `CHEAPO_DATE_FORMAT`. The CLI's human-
+  readable "Free until:" line honors `CHEAPO_CLI_OUTPUT_DATE_FORMAT` (default
+  RFC-3339). Avoid ambiguous `DD.MM.`/`MM/DD` outputs without a year.
 - Wrap errors with context: `fmt.Errorf("epic: ...: %w", err)`.
 - New store platforms (Prime, GOG, …) follow the provider pattern (above).
 - **Chatto client:** `internal/chatto` is a hand-built Connect-JSON client