diff --git a/package.json b/package.json index 6b5af1d..571830a 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "chart.js": "^2.7.1", "classnames": "^2.2.6", "cross-env": "^5.2.0", - "date-fns": "^1.30.1", + "date-fns": "^2.15.0", "eslint": "^7.6.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-jquery": "^1.5.1", diff --git a/resources/assets/js/user/stats.ts b/resources/assets/js/user/stats.ts index f3c0c2a..36ccc02 100644 --- a/resources/assets/js/user/stats.ts +++ b/resources/assets/js/user/stats.ts @@ -90,7 +90,7 @@ function createMonthlyGraphData(from: Date) { for (let i = 0; i < 12; i++) { const current = addMonths(from, i); - const yearAndMonth = format(current, 'YYYY/MM'); + const yearAndMonth = format(current, 'yyyy/MM'); keys.push(yearAndMonth); values.push(graphData.monthlySum[yearAndMonth] || 0); } diff --git a/yarn.lock b/yarn.lock index e39ef96..00585d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2562,11 +2562,16 @@ d@1, d@^1.0.1: es5-ext "^0.10.50" type "^1.0.1" -date-fns@^1.27.2, date-fns@^1.30.1: +date-fns@^1.27.2: version "1.30.1" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== +date-fns@^2.15.0: + version "2.15.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.15.0.tgz#424de6b3778e4e69d3ff27046ec136af58ae5d5f" + integrity sha512-ZCPzAMJZn3rNUvvQIMlXhDr4A+Ar07eLeGsGREoWU19a3Pqf5oYa+ccd+B3F6XVtQY6HANMFdOQ8A+ipFnvJdQ== + debug@2.6.9, debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"