@@ -92,14 +92,14 @@ def _extract_quarter(t, op):
92
92
93
93
94
94
_truncate_modifiers = {
95
- DateUnit .DAY : "start of day" ,
96
- DateUnit .WEEK : "weekday 1" ,
97
- DateUnit .MONTH : "start of month" ,
98
- DateUnit .YEAR : "start of year" ,
99
- IntervalUnit .DAY : "start of day" ,
100
- IntervalUnit .WEEK : "weekday 1" ,
101
- IntervalUnit .MONTH : "start of month" ,
102
- IntervalUnit .YEAR : "start of year" ,
95
+ DateUnit .DAY : ( "start of day" ,) ,
96
+ DateUnit .WEEK : ( "weekday 0" , "-6 days" ) ,
97
+ DateUnit .MONTH : ( "start of month" ,) ,
98
+ DateUnit .YEAR : ( "start of year" ,) ,
99
+ IntervalUnit .DAY : ( "start of day" ,) ,
100
+ IntervalUnit .WEEK : ( "weekday 1" ,) ,
101
+ IntervalUnit .MONTH : ( "start of month" ,) ,
102
+ IntervalUnit .YEAR : ( "start of year" ,) ,
103
103
}
104
104
105
105
@@ -112,7 +112,7 @@ def translator(t, op):
112
112
raise com .UnsupportedOperationError (
113
113
f"Unsupported truncate unit { op .unit !r} "
114
114
)
115
- return func (sa_arg , modifier )
115
+ return func (sa_arg , * modifier )
116
116
117
117
return translator
118
118
0 commit comments