-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
날짜 포맷 변경으로 인한 DateFormatter 코드 리팩토링 #235
Conversation
그나마 줄이면 이정도...?
let param = (iso8601Formatter.date(from: self) ?? .init()).toDMSNoticeTimeString() | ||
|
||
let formatter = DateFormatter() | ||
formatter.dateFormat = "yy/MM/dd HH:mm" | ||
return formatter.date(from: param) ?? .init() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 과정에 왜필요한거죠?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
서버에서 데이터가 date 형식으로 오는데 date로 반환되어야 원래 사용하던 곳에서 사용 가능해서 string으로 바꾸고 한 번 더 포매팅을 해줬어요,,,,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그걸 iso8601formatter가 하는거 아닌가요..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 string으로 오는데 iso로 date로 바꾸고 string으로 변환한담에,,, 다시 포맷 맞춰서 date로 반환하게 짰어요... 그냥 저 dateFormat에 바로 넣으면 자꾸 현재 날짜/시간으로 초기화가 돼서,,,
이렇게 하면 시간 날짜 다 정상으로 나오긴 해요,,,, 좀 많이 하드코딩일 뿐,,,,,,,,
뻘짓을 신나게 하고 있었네요,,,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baekteun 얘네도 뺄까요? 워치가 시뮬에선 작동 안 해서 확인을 못했어요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iOS에서 변경된대로 따라가죠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
똑같은 API라 iOS가 되면 둘 다 될거같은데,, 뭐 하늘에 빌어아죠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음.,, 워치는 지금 날짜 사이에 -로 구분하는데 iOS 앱 처럼 /로 구분하게 맞출까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 파싱하는거 말고 화면에 보일때 말한거였나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엄ㅁ.. 그냥 이대로 갈까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넹
개요
작업사항