mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-07-19 14:43:58 +09:00
Merge pull request #67 from fharper/fharper/date
fix date conversion (fix #66)
This commit is contained in:
+7
-2
@@ -26,7 +26,7 @@ async function processPayloadsPromise(payloads, loadFunc) {
|
|||||||
}
|
}
|
||||||
}, payload.delay);
|
}, payload.delay);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const results = await Promise.allSettled(promises);
|
const results = await Promise.allSettled(promises);
|
||||||
const failedCount = results.filter(result => result.status === 'rejected').length;
|
const failedCount = results.filter(result => result.status === 'rejected').length;
|
||||||
if (failedCount === 0) {
|
if (failedCount === 0) {
|
||||||
@@ -157,7 +157,12 @@ async function loadImageFilePromise(imageUrl) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getPostPath(post, config) {
|
function getPostPath(post, config) {
|
||||||
const dt = luxon.DateTime.fromISO(post.frontmatter.date);
|
let dt;
|
||||||
|
if (settings.custom_date_formatting) {
|
||||||
|
dt = luxon.DateTime.fromFormat(post.frontmatter.date, settings.custom_date_formatting);
|
||||||
|
} else {
|
||||||
|
dt = luxon.DateTime.fromISO(post.frontmatter.date);
|
||||||
|
}
|
||||||
|
|
||||||
// start with base output dir
|
// start with base output dir
|
||||||
const pathSegments = [config.output];
|
const pathSegments = [config.output];
|
||||||
|
|||||||
Reference in New Issue
Block a user