-
Notifications
You must be signed in to change notification settings - Fork 15
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] #170 월 계산로직 수정 및 에러 핸들링 #176
Merged
lsj8706
merged 5 commits into
sopt-makers:develop
from
lsj8706:feat/#170-월-계산로직-수정-및-에러핸들링
Apr 17, 2023
The head ref may contain hidden characters: "feat/#170-\uC6D4-\uACC4\uC0B0\uB85C\uC9C1-\uC218\uC815-\uBC0F-\uC5D0\uB7EC\uD578\uB4E4\uB9C1"
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
78e69a7
[Fix] #170 - 솝트 활동 개월 계산 로직 수정
lsj8706 c9d5b0f
[Chore] #170 - let으로 변수 선언 변경
lsj8706 c98cf3f
[Merge] #170 - merge develop
lsj8706 6ffe481
[Feat] #170 - 메인 뷰에서 유저 정보를 가져오다가 에러 발생 시 AlertView 보여주고 확인 버튼 클릭하면 재시도
lsj8706 60a0dcb
[Merge] #170 - merge develop
lsj8706 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
SOPT-iOS/Projects/Core/Sources/Extension/Foundation+/Date+.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// Date+.swift | ||
// Core | ||
// | ||
// Created by sejin on 2023/04/17. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public extension Date { | ||
/// Create a date from specified parameters | ||
/// | ||
/// - Parameters: | ||
/// - year: The desired year | ||
/// - month: The desired month | ||
/// - day: The desired day | ||
/// - Returns: A `Date` object | ||
static func from(year: Int, month: Int, day: Int) -> Date? { | ||
let calendar = Calendar(identifier: .gregorian) | ||
var dateComponents = DateComponents() | ||
dateComponents.timeZone = TimeZone.current | ||
dateComponents.year = year | ||
dateComponents.month = month | ||
dateComponents.day = day | ||
return calendar.date(from: dateComponents) ?? nil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
개월수를 서버에서 뿌려주는게 아니였군요.. !!!!
솝트 홈피에는 창립이 2008로 나오긴 하는디 ... 따로 기획한테 안물어보고 작업해도 될가요옹?
특이사항만 있는지 한번만 체크해봐도 좋을거같아여
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.
2008년으로 알고 있기는 했는데 그렇게 하면 기수 계산이 밀려서 2007년으로 두고 했어요!
여기에 있는 기수, 날짜를 토대로 식을 세우다 보니 2007년으로 했는데 이 부분은 나중에 서버에서 계산해서 내려주는 걸로 바뀔 것 같아요~!
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.
굿 !! 👍🏻