Skip to content

Commit

Permalink
Fix date parsing for dir posts (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
ia3andy authored Dec 26, 2024
1 parent 28b7eec commit 260de4c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ protected static ZonedDateTime parsePublishDate(Path file, JsonObject frontMatte
if (frontMatter.containsKey(DATE_KEY)) {
dateString = frontMatter.getString(DATE_KEY);
} else {
Matcher matcher = FILE_NAME_DATE_PATTERN.matcher(file.getFileName().toString());
Matcher matcher = FILE_NAME_DATE_PATTERN.matcher(file.toString());
if (!matcher.find()) {
// Lets fallback on using today's date if not specified
return ZonedDateTime.now();
Expand Down

0 comments on commit 260de4c

Please sign in to comment.