new listings daily roundups rss
This commit is contained in:
7
node_modules/@11ty/eleventy-plugin-rss/src/getNewestCollectionItemDate.js
generated
vendored
Normal file
7
node_modules/@11ty/eleventy-plugin-rss/src/getNewestCollectionItemDate.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
export default function(collection, emptyFallbackDate) {
|
||||
if( !collection || !collection.length ) {
|
||||
return emptyFallbackDate || new Date();
|
||||
}
|
||||
|
||||
return new Date(Math.max(...collection.map(item => {return item.date})));
|
||||
}
|
||||
Reference in New Issue
Block a user