Skip to content

Commit 12df1e2

Browse files
authored
Merge pull request #122 from kimcoleman/fix-translated-dates-for-reports
Fix for non english language sites to force DateTime in numeric formats only
2 parents a518011 + 91d6560 commit 12df1e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

classes/class-swsales-reports.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ public static function show_report( $sitewide_sale ) {
145145
// Build an array with each day of sale as a key to store revenue data in.
146146
$date_array_all = array();
147147
$period = new \DatePeriod(
148-
new \DateTime( $sitewide_sale->get_start_date() ),
148+
new \DateTime( $sitewide_sale->get_start_date( 'Y-m-d' ) ),
149149
new \DateInterval('P1D'),
150-
new \DateTime( $sitewide_sale->get_end_date() . ' + 1 day' )
150+
new \DateTime( $sitewide_sale->get_end_date( 'Y-m-d' ) . ' + 1 day' )
151151
);
152152
foreach ($period as $key => $value) {
153153
$date_array_all[ $value->format('Y-m-d') ] = 0.0;

0 commit comments

Comments
 (0)