Skip to content

Commit

Permalink
Support project updated field
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhamsing committed Mar 22, 2021
1 parent d128cbb commit 21d5415
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/xcodebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
- name: Xcode build
run: |
cd Swift/
xcodebuild clean build -scheme osia -destination 'platform=iOS Simulator,name=iPhone 11,OS=13.4'
xcodebuild clean build -scheme osia -destination 'platform=iOS Simulator,name=iPhone 11,OS=13.4.1'
7 changes: 6 additions & 1 deletion Swift/osia/List/AppCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private extension App {

private extension App {
var dateDisplay: String? {
return dateAdded?.date?.yearDisplay ?? dateAdded
return dateUpdated?.date?.yearDisplay ?? dateUpdated
}

var tagDisplay: String? {
Expand Down Expand Up @@ -107,6 +107,11 @@ extension String {
return date
}

dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss Z"
if let date = dateFormatter.date(from: self) {
return date
}

return nil
}
}
4 changes: 2 additions & 2 deletions Swift/osia/Models/App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct App: Codable {
private enum CodingKeys: String, CodingKey {
case title
case categoryIds = "category-ids"
case dateAdded = "date_added"
case dateUpdated = "updated"
case description
case screenshots
case source
Expand All @@ -21,7 +21,7 @@ struct App: Codable {

var title: String?
var categoryIds: [String]?
var dateAdded: String?
var dateUpdated: String?
var description: String?
var screenshots: [String]?
var source: URL?
Expand Down

0 comments on commit 21d5415

Please sign in to comment.