From 993be621a2b9dbd92d352d8d6d7451c7eb9f8eac Mon Sep 17 00:00:00 2001 From: root Date: Tue, 6 Jan 2026 07:58:48 +0000 Subject: [PATCH] Document that model datetime attributes are already ISO strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- docs/CLAUDE.dist.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/CLAUDE.dist.md b/docs/CLAUDE.dist.md index b1e52c0e3..f5171fdc6 100644 --- a/docs/CLAUDE.dist.md +++ b/docs/CLAUDE.dist.md @@ -951,6 +951,8 @@ Sessions persist 365 days. Never implement "Remember Me". **String-Based**: ISO strings, not Carbon. Never use `$casts` with `'date'`/`'datetime'` - blocked by `rsx:check`. +**MODEL ATTRIBUTES ARE ALREADY STRINGS**: `$model->created_at` returns `"2025-12-24T15:30:00.000Z"`, NOT Carbon. Never call `->format()` on datetime attributes. Use `Rsx_Time::format($model->created_at)`. + Pattern recognition: - `Rsx_Time::now()`, `Rsx_Time::format()`, `Rsx_Time::relative()` - `Rsx_Date::today()`, `Rsx_Date::format()`, `Rsx_Date::is_past()`