From daeea439f9a507f83b60893aad9cc7fb7b89154c Mon Sep 17 00:00:00 2001 From: yuni Date: Wed, 1 May 2024 02:52:32 +0900 Subject: [PATCH] =?UTF-8?q?refactoring:=20data=20formatting=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/HomeScreen.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/frontend/src/pages/HomeScreen.js b/frontend/src/pages/HomeScreen.js index 097506c..9440c56 100644 --- a/frontend/src/pages/HomeScreen.js +++ b/frontend/src/pages/HomeScreen.js @@ -9,7 +9,7 @@ import { Dimensions, } from 'react-native' import { dateApiKey } from '../data/apiKey' -import { formatOperation, formatHoliday } from '../utils/dateUtils' +import { formatOperation, formatHoliday, formatDate } from '../utils/dateUtils' import operation from '../data/operation.json' import knuEvent from '../data/knuEvent.json' import Round from '../components/Round' @@ -143,17 +143,6 @@ const HomeScreen = () => { checkHoliday() }, [selectedDate, holidays]) - // 요일 계산 -------------------------------------------------------------- - const formatDate = (date) => { - const weekDays = ['일', '월', '화', '수', '목', '금', '토'] - const year = date.getFullYear() - const month = date.getMonth() + 1 - const day = date.getDate() - const weekDay = weekDays[date.getDay()] - - return `${year}년 ${month}월 ${day}일 (${weekDay})` - } - const dateColor = () => { const weekDay = selectedDate.getDay() return weekDay === 6 @@ -275,9 +264,6 @@ const styles = StyleSheet.create({ knuText: { color: '#2c3e50', }, - defaultText: { - color: '#2c3e50', - }, roundContainer: { flex: 1, marginTop: scale(10),