summaryrefslogtreecommitdiff
path: root/components/bidding/bidding-info-header.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-09-09 10:32:34 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-09-09 10:32:34 +0000
commitc62ec046327fd388ebce04571b55910747e69a3b (patch)
tree41ccdc4a8dea99808622f6d5d52014ac59a2d7ab /components/bidding/bidding-info-header.tsx
parentebcec3f296d1d27943caf8a3aed26efef117cdc5 (diff)
(정희성, 최겸, 대표님) formatDate 변경 등
Diffstat (limited to 'components/bidding/bidding-info-header.tsx')
-rw-r--r--components/bidding/bidding-info-header.tsx21
1 files changed, 1 insertions, 20 deletions
diff --git a/components/bidding/bidding-info-header.tsx b/components/bidding/bidding-info-header.tsx
index c140920b..e109a8ca 100644
--- a/components/bidding/bidding-info-header.tsx
+++ b/components/bidding/bidding-info-header.tsx
@@ -1,31 +1,12 @@
import { Bidding } from '@/db/schema/bidding'
import { Building2, Package, User, DollarSign, Calendar } from 'lucide-react'
import { contractTypeLabels, biddingTypeLabels } from '@/db/schema/bidding'
+import { formatDate } from '@/lib/utils'
interface BiddingInfoHeaderProps {
bidding: Bidding
}
-function formatDate(date: Date | string | null | undefined, locale: 'KR' | 'EN' = 'KR'): string {
- if (!date) return ''
-
- const dateObj = typeof date === 'string' ? new Date(date) : date
-
- if (locale === 'KR') {
- return dateObj.toLocaleDateString('ko-KR', {
- year: 'numeric',
- month: '2-digit',
- day: '2-digit'
- }).replace(/\./g, '-').replace(/-$/, '')
- }
-
- return dateObj.toLocaleDateString('en-US', {
- year: 'numeric',
- month: '2-digit',
- day: '2-digit'
- })
-}
-
export function BiddingInfoHeader({ bidding }: BiddingInfoHeaderProps) {
return (
<div className="bg-white border rounded-lg p-6 mb-6 shadow-sm">