Commit 4ad1812
Christopher Doris
fix(numpydates): correct year/month extraction in DateTime64(Date)
Use Dates.year(d) and Dates.month(d) in the Date-based constructor
instead of value(Dates.Year(d)) and value(Dates.Month(d)). The
previous approach could error or yield wrong values when computing
YEAR/MONTH offsets relative to 1970, affecting YEARS and MONTHS units.
Also includes minor whitespace cleanup.1 parent 2a21d64 commit 4ad1812
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
| 96 | + | |
95 | 97 | | |
96 | | - | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| 131 | + | |
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| |||
0 commit comments