Refactor date formatting from String (#1229)

* refactor date formatting from String

* undo new file
This commit is contained in:
Ryan Nystrom
2017-12-16 22:16:01 -05:00
committed by GitHub
parent 0db76b3b76
commit eb7069f6f7
10 changed files with 66 additions and 65 deletions

View File

@@ -45,8 +45,7 @@ extension RepoPullRequestPagesQuery: RepositoryQuery {
}
func createSummaryModel(_ node: RepositoryIssueSummaryType, containerWidth: CGFloat) -> RepositoryIssueSummaryModel? {
guard let date = GithubAPIDateFormatter().date(from: node.repoEventFields.createdAt)
else { return nil }
guard let date = node.repoEventFields.createdAt.githubDate else { return nil }
let attributes = [
NSAttributedStringKey.font: Styles.Fonts.body,