feat: refactor date formatting and timezone utilities for improved consistency and functionality
Some checks failed
Frontend CI / lint (push) Failing after 19s
Frontend CI / build (push) Has been skipped

This commit is contained in:
JSC
2025-08-15 23:43:17 +02:00
parent cd654b8777
commit 9cfa1f6a28
9 changed files with 148 additions and 45 deletions

View File

@@ -2,6 +2,7 @@ import { Badge } from '@/components/ui/badge'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
import { NumberFlowDuration } from '@/components/ui/number-flow-duration'
import type { Playlist, PlaylistSound } from '@/lib/api/services/playlists'
import { formatDate } from '@/utils/format-date'
import NumberFlow from '@number-flow/react'
import { Clock } from 'lucide-react'
@@ -42,14 +43,14 @@ export function PlaylistStatsCard({ playlist, sounds }: PlaylistStatsCardProps)
<div className="flex justify-between text-sm">
<span>Created:</span>
<span>
{new Date(playlist.created_at).toLocaleDateString()}
{formatDate(playlist.created_at, true, true)}
</span>
</div>
{playlist.updated_at && (
<div className="flex justify-between text-sm">
<span>Updated:</span>
<span>
{new Date(playlist.updated_at).toLocaleDateString()}
{formatDate(playlist.updated_at, true, true)}
</span>
</div>
)}