Skip to content
This repository has been archived by the owner on Aug 20, 2023. It is now read-only.

Commit

Permalink
Feature/t3 (#27)
Browse files Browse the repository at this point in the history
* Initial commit

* ItsBrokenSad

* T3 Except Day Grouping

* I give up :(

* T3 Fonctionnel

* T3 Optimisation

* T3 DayWeekMonth forfun

* T3 Week SmallFix

---------

Co-authored-by: GaelLetourneur <[email protected]>
  • Loading branch information
KenJoelTL and GaelL42 authored Mar 15, 2023
1 parent 8e3f55f commit c37071b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/BarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function BarChart({ statList, timeGrouping }) {
if (timeGrouping == 'month') {
groupedDate = Date.parse(statList[i].date.slice(0, 7) + '-01 00:00:00 GMT-0500')
} else if (timeGrouping == 'week') {
groupedDate = Date.parse(startOfWeek(new Date(statList[i].date.slice(0, 10)), { weekStartsOn: 1 }))
groupedDate = Date.parse(startOfWeek(new Date(statList[i].date.slice(0, 10) + ' 00:00:00 GMT-0500')))
} else { // jour
groupedDate = Date.parse(statList[i].date.slice(0, 10) + ' 00:00:00 GMT-0500')
}
Expand All @@ -28,4 +28,4 @@ function BarChart({ statList, timeGrouping }) {
return <Bar data={chartData} options={chartOptions} />
}

export default BarChart
export default BarChart

0 comments on commit c37071b

Please sign in to comment.