mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
14 lines
329 B
JavaScript
14 lines
329 B
JavaScript
|
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;
|