mirror of
https://github.com/tiennm99/awesome-advent-of-code.git
synced 2026-10-20 02:16:53 +00:00
ensure badges show green if updated same day (#966)
This commit is contained in:
1 parent
19c8bf10d9
commit
23ffd9f467
1 file changed
+1
-1
@@ -85,6 +85,6 @@ function age(date) {
|
||||
if (now.diff(date) < 0) date.add(-1, 'y')
|
||||
|
||||
const daysElapsed = now.diff(moment(date), 'days')
|
||||
const colorByAge = colorScale([1, 5, 10, 20, 25], undefined, false)
|
||||
const colorByAge = colorScale([0, 5, 10, 20, 25], undefined, false)
|
||||
return colorByAge(daysElapsed)
|
||||
}
|
||||
Reference in new issue
Block a user