File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
WooCommerce/Classes/ViewRelated/Dashboard/MyStore Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,6 @@ extension PeriodDataViewController: IAxisValueFormatter {
179179
180180 if axis is XAxis {
181181 if let item = orderStats. items ? [ Int ( value) ] {
182- // FIXME: This logic could prolly be pushed into a model extension
183182 var dateString = " "
184183 switch orderStats. granularity {
185184 case . day:
@@ -188,7 +187,8 @@ extension PeriodDataViewController: IAxisValueFormatter {
188187 }
189188 case . week:
190189 if let periodDate = DateFormatter . Stats. statsWeekFormatter. date ( from: item. period) {
191- dateString = DateFormatter . Charts. chartsWeekFormatter. string ( from: periodDate)
190+ let firstMonday = Calendar . current. date ( byAdding: . day, value: 1 , to: periodDate) ?? periodDate
191+ dateString = DateFormatter . Charts. chartsWeekFormatter. string ( from: firstMonday)
192192 }
193193 case . month:
194194 if let periodDate = DateFormatter . Stats. statsMonthFormatter. date ( from: item. period) {
You can’t perform that action at this time.
0 commit comments