Skip to content

Commit

Permalink
Merge pull request #323 from rgoldberg/info-date-format
Browse files Browse the repository at this point in the history
info command now outputs ISO date format
  • Loading branch information
phatblat authored Mar 14, 2021
2 parents 7d90e9e + 5a2f860 commit a38235a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions MasKit/Formatters/AppInfoFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ struct AppInfoFormatter {
serverDateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"

let humanDateFormatter = DateFormatter()
humanDateFormatter.timeStyle = .none
humanDateFormatter.dateStyle = .medium
humanDateFormatter.dateFormat = "yyyy-MM-dd"
return serverDateFormatter.date(from: serverDate).flatMap(humanDateFormatter.string(from:)) ?? ""
}
}
2 changes: 1 addition & 1 deletion MasKitTests/Commands/InfoCommandSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class InfoCommandSpec: QuickSpec {
let expectedOutput = """
Awesome App 1.0 [2.0]
By: Awesome Dev
Released: Jan 7, 2019
Released: 2019-01-07
Minimum OS: 10.14
Size: 1 KB
From: https://awesome.app
Expand Down

0 comments on commit a38235a

Please sign in to comment.