Skip to content

Commit e217501

Browse files
committed
Clean up timestamps from dateModified
1 parent e22846d commit e217501

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/blocks/extractor/textParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class TextParser {
1616
return readFile(filePath, 'utf8').then(content => {
1717
const { body, attributes } = frontmatter(content);
1818
const {
19-
dateModified = '2021-06-13T05:00:00-04:00',
19+
dateModified = '2021-06-13',
2020
author = null,
2121
language = null,
2222
...restAttributes

src/test/blocks/extractor/textParser.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { TextParser } from 'blocks/extractor/textParser';
33
jest.mock('fs/promises', () => ({
44
readFile: jest.fn(() =>
55
Promise.resolve(
6-
'---\ntitle: Snippet\ntags: [array,object]\ndateModified: 2017-12-22T21:54:30+02:00\n---\n\nThis is some text.\n'
6+
'---\ntitle: Snippet\ntags: [array,object]\ndateModified: 2017-12-22\n---\n\nThis is some text.\n'
77
)
88
),
99
readdir: jest.fn(() => Promise.resolve(['any.md'])),

0 commit comments

Comments
 (0)