You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings,
I have a markdown file that has a date frontmatter field that expects the date in YYYY-MM-DD format. When I read the data out using front-matter (for instance, using the date '2021-04-01'), I get the date with a bunch of other crap in there. It seems to be actually parsing the date and adjusting for timezone, so in the previous instance I get 'Wed Mar 31 2021 19:00:00 GMT-0500 (Central Daylight Time)'. Is there a way to tell it not to try and infer the type without changing the format (which I can't do without breaking a lot of other stuff)? I really just need the raw text value.
The text was updated successfully, but these errors were encountered:
Same happened to me. I investigated and the problem appears to be that front-matter uses js-yaml with the default DEFAULT_SCHEMA which includes automatic detection of dates. It would be better to use CORE_SCHEMA or to pass through a schema option to js-yaml.
Greetings,
I have a markdown file that has a date frontmatter field that expects the date in YYYY-MM-DD format. When I read the data out using front-matter (for instance, using the date '2021-04-01'), I get the date with a bunch of other crap in there. It seems to be actually parsing the date and adjusting for timezone, so in the previous instance I get 'Wed Mar 31 2021 19:00:00 GMT-0500 (Central Daylight Time)'. Is there a way to tell it not to try and infer the type without changing the format (which I can't do without breaking a lot of other stuff)? I really just need the raw text value.
The text was updated successfully, but these errors were encountered: