0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/server/data/meta/modified_date.js

14 lines
329 B
JavaScript
Raw Normal View History

function getModifiedDate(data) {
var context = data.context ? data.context[0] : null,
modDate;
if (data[context]) {
modDate = data[context].updated_at || null;
if (modDate) {
return new Date(modDate).toISOString();
}
}
return null;
}
module.exports = getModifiedDate;