0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/server/data/meta/published_date.js

10 lines
274 B
JavaScript
Raw Normal View History

function getPublishedDate(data) {
var context = data.context ? data.context[0] : null;
if (data[context] && data[context].published_at) {
return new Date(data[context].published_at).toISOString();
}
return null;
}
module.exports = getPublishedDate;