Skip to content

Commit

Permalink
Clean up timestamps from dateModified
Browse files Browse the repository at this point in the history
  • Loading branch information
Chalarangelo committed Sep 24, 2023
1 parent e22846d commit e217501
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/blocks/extractor/textParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class TextParser {
return readFile(filePath, 'utf8').then(content => {
const { body, attributes } = frontmatter(content);
const {
dateModified = '2021-06-13T05:00:00-04:00',
dateModified = '2021-06-13',
author = null,
language = null,
...restAttributes
Expand Down
2 changes: 1 addition & 1 deletion src/test/blocks/extractor/textParser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TextParser } from 'blocks/extractor/textParser';
jest.mock('fs/promises', () => ({
readFile: jest.fn(() =>
Promise.resolve(
'---\ntitle: Snippet\ntags: [array,object]\ndateModified: 2017-12-22T21:54:30+02:00\n---\n\nThis is some text.\n'
'---\ntitle: Snippet\ntags: [array,object]\ndateModified: 2017-12-22\n---\n\nThis is some text.\n'
)
),
readdir: jest.fn(() => Promise.resolve(['any.md'])),
Expand Down

0 comments on commit e217501

Please sign in to comment.