diff --git a/scripts/build.js b/scripts/build.js
index a8ec3d088..ff2c519a7 100644
--- a/scripts/build.js
+++ b/scripts/build.js
@@ -118,17 +118,10 @@ for (const snippetFile of fs.readdirSync(SNIPPETS_PATH)) {
// new icon = less than 31 days old
const date = (snippetData.match(//) || [, ''])[1]
- if (date && differenceInDays(new Date(date), new Date()) < 31) {
- snippetEl.prepend(
- createElement(
- '
'
- )
- )
- link.prepend(
- createElement(
- ''
- )
- )
+ if (date && differenceInDays(new Date(), new Date(date)) < 31) {
+ const newIcon = '
'
+ snippetEl.prepend(createElement(newIcon))
+ link.prepend(createElement(newIcon))
}
// tags