Skip to content

Commit

Permalink
build(date-labels): prevent future missing years
Browse files Browse the repository at this point in the history
Might as well generate a bunch of future years so we don't have to remember to run this.
  • Loading branch information
ashley-hebler committed Apr 8, 2024
1 parent 53a8e3d commit 2c6ec7d
Show file tree
Hide file tree
Showing 36 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"icons",
"deps",
"layout",
"type"
"type",
"date-labels"
]
}
Binary file modified assets/images/date-labels/1999.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2004.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2005.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2006.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2008.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2009.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2010.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2015.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2016.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2017.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2018.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2022.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/date-labels/2023.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2024.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2025.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2026.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2027.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2028.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2029.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2030.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2031.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2032.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2033.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2034.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2035.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/date-labels/2036.png
Binary file added assets/images/date-labels/2037.png
Binary file added assets/images/date-labels/2038.png
Binary file added assets/images/date-labels/2039.png
Binary file added assets/images/date-labels/2040.png
Binary file added assets/images/date-labels/2041.png
Binary file added assets/images/date-labels/2042.png
Binary file added assets/images/date-labels/2043.png
Binary file added assets/images/date-labels/2044.png
5 changes: 3 additions & 2 deletions docs/config/tasks/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,10 @@ const downloadAsset = async (url, name) => {

const years = () => {
const now = new Date().getUTCFullYear();
return Array(now - 1998)
const in20years = now + 20;
return Array(in20years - 1998)
.fill('')
.map((v, idx) => now - idx);
.map((v, idx) => in20years - idx);
};

module.exports = {
Expand Down

0 comments on commit 2c6ec7d

Please sign in to comment.