-
Notifications
You must be signed in to change notification settings - Fork 5
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
[feat] 메뉴 상세정보에서 현재 날짜가 가장 먼저 표시되도록 수정 #233
Conversation
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.
수고하셨습니다 👼
if isOpenned && | ||
currentDay >= 0 && | ||
!expandableData.labelText[currentDay].isEmpty { |
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.
p5;
어웈... 그러면 지금 날짜순 정렬은 적용되어 있지 않은 상태이죠?
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.
월화수목금토 -> 수목금토일월화 로 변경되는거였나요?
저는
카카오맵이나 네이버지도에서 쓰는 방식처럼
(펼치기 전에는) 오늘 날짜에 해당하는 요일의 시간 1개만 표기하고,
(펼치면) 전체 날짜를 표기하는 식으로 처리했었는데,
이렇게 하는게 아니였나요..?
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.
두개다 해야하는 것 같습니다 ㅜㅜㅜㅜ 펼치기 전에는 해당 요일의 시간 + 펼친 후에는 해당 요일부터 순서대로 근데 혹시 모르니 한번 더 질문해보겠습니다
extension Date { | ||
// Swift 상에서는 일 -> 1, 월 -> 2로 표기되지만, | ||
// 현재 서버에서는 월 -> 0, 화 -> 1로 표기되고 있어서 변환하는 계산식을 추가하였습니다. | ||
func dayNumberOfWeek() -> Int { | ||
if let day = Calendar.current.dateComponents([.weekday], from: self).weekday { | ||
switch(day) { | ||
case 1 : return 6 | ||
case 2 : return 0 | ||
case 3...7 : return day - 2 | ||
default : return -1 | ||
} | ||
} else { | ||
return -1 | ||
} | ||
} | ||
} |
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.
p5;
👍 👍
@i-colours-u |
🔥 Pull requests
⛳️ 작업한 브랜치
👷 작업한 내용
기존에는 무조건 월요일부터 영업시간이 표기가 되었다면,
현재 요일에 맞춰서, 표기되도록 수정
(ex 화요일인 경우, 화요일이 먼저 표시되도록)
여기서는 일요일이 1, 월요일이 2 화요일이 3.. 이렇게 표시되는 반면,
저희 서버에서 주는 정보는
월요일이 0, 화요일이 1... 이런 순으로 진행되어서
따로 계산하는 식을 추가하였습니다.
📸 스크린샷