- Refine and expand best practices for: - AI SDK - Date-fns - Next.js - Radix UI - React - React Hook Form - Stripe - Tailwind CSS - TypeScript - Zustand - Improve guidelines with more specific and actionable recommendations - Enhance type safety and performance suggestions across different technologies
10 lines
430 B
Plaintext
10 lines
430 B
Plaintext
---
|
|
description: Best practices for date and time manipulation with date-fns
|
|
globs: **/*.{ts,tsx,js,jsx}
|
|
alwaysApply: false
|
|
---
|
|
|
|
- Use the `format` function for consistent date formatting across your application.
|
|
- Implement proper timezone handling using the `utcToZonedTime` function.
|
|
- Utilize the `intervalToDuration` function for calculating time differences.
|
|
- Leverage the `isWithinInterval` function for date range checks. |