chore: code cleanup, removing console.logs, adding year grid

This commit is contained in:
Kyle Gill
2019-03-28 23:41:43 -06:00
parent eb2a76ff7c
commit e1af351b67
10 changed files with 96 additions and 47 deletions

View File

@@ -1,5 +1,3 @@
import format from "date-fns/format";
export const pad = n => (n < 10 ? "0" : "") + n;
export const todayUrl = (date = new Date()) =>
@@ -8,7 +6,7 @@ export const todayUrl = (date = new Date()) =>
export const yearUrl = (date = new Date()) => `/${date.getFullYear()}/`;
export const months = {
short: Array.from({ length: 12 }, (x, index) =>
new Date(0, index).toLocaleDateString("en-US", { month: "short" })
long: Array.from({ length: 12 }, (x, index) =>
new Date(0, index).toLocaleDateString("en-US", { month: "long" })
)
};