Extract todayISO() utility to lib/utils.ts #42

Closed
opened 2026-05-02 13:35:20 +02:00 by myrmidex · 0 comments
Owner

new Date().toISOString().split('T')[0] appears 5 times across AddPurchaseForm.tsx (lines 31, 75, 100) and UpdatePriceForm.tsx (lines 25, 63).

Fix: Add export const todayISO = (): string => new Date().toISOString().split('T')[0] to resources/js/lib/utils.ts and import it.

Effort: XS — collect in a small cleanups commit.

`new Date().toISOString().split('T')[0]` appears 5 times across `AddPurchaseForm.tsx` (lines 31, 75, 100) and `UpdatePriceForm.tsx` (lines 25, 63). **Fix:** Add `export const todayISO = (): string => new Date().toISOString().split('T')[0]` to `resources/js/lib/utils.ts` and import it. **Effort:** XS — collect in a small cleanups commit.
myrmidex added this to the v0.3.0 milestone 2026-05-02 13:35:20 +02:00
myrmidex self-assigned this 2026-05-02 20:42:25 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lvl0/incr#42
No description provided.