Skip to content

Commit a0297a2

Browse files
committed
fix: more time formatting
1 parent 380688a commit a0297a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/utils/buildAxis.linear.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ function buildTimeAxis<TDatum>(
231231
}
232232
if (units.year(date) < date) {
233233
// months - remove potential days, hours, minutes, seconds and milliseconds
234-
return timeFormat(trimFormat(format.replace(/%-d.*?(\s|$)/, '')))(date)
234+
return timeFormat(trimFormat(format.replace(/%-d.*/, '')))(date)
235235
}
236236
// years
237237
return timeFormat('%Y')(date)

0 commit comments

Comments
 (0)