Skip to content

Commit

Permalink
feat: Use the creation date as the backup published date, not the mod…
Browse files Browse the repository at this point in the history
…ified date
  • Loading branch information
kevinrenskers committed Nov 19, 2024
1 parent 26e9138 commit 94f39ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Saga/Reader+Decoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public extension Reader {
}

static func resolvePublishingDate(from path: Path, decoder: MetadataDecoder) throws -> Date {
return try decoder.decodeIfPresent("date", as: Date.self) ?? path.modificationDate ?? Date()
return try decoder.decodeIfPresent("date", as: Date.self) ?? path.creationDate ?? Date()
}
}

0 comments on commit 94f39ed

Please sign in to comment.