mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-06-05 15:09:59 +09:00
Need post.date instead of just post
This commit is contained in:
@@ -5,7 +5,7 @@ const settings = require('../settings');
|
||||
// get post date, optionally formatted as specified in settings
|
||||
// this value is also used for year/month folders, date prefixes, etc. as needed
|
||||
module.exports = (post) => {
|
||||
const dateTime = luxon.DateTime.fromRFC2822(post.pubDate[0], { zone: settings.custom_date_timezone });
|
||||
const dateTime = luxon.DateTime.fromRFC2822(post.data.pubDate[0], { zone: settings.custom_date_timezone });
|
||||
|
||||
if (settings.custom_date_formatting) {
|
||||
return dateTime.toFormat(settings.custom_date_formatting);
|
||||
|
||||
Reference in New Issue
Block a user