Skip to content

Commit

Permalink
fix: more time formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Aug 7, 2022
1 parent 380688a commit a0297a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/buildAxis.linear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function buildTimeAxis<TDatum>(
}
if (units.year(date) < date) {
// months - remove potential days, hours, minutes, seconds and milliseconds
return timeFormat(trimFormat(format.replace(/%-d.*?(\s|$)/, '')))(date)
return timeFormat(trimFormat(format.replace(/%-d.*/, '')))(date)
}
// years
return timeFormat('%Y')(date)
Expand Down

0 comments on commit a0297a2

Please sign in to comment.