DataConverter asNumber returns only the day of month for Date values
Author: OskarEichlerCreated Aug 30, 2026Updated Sep 26, 2026
LabelsType: BugProduct: HighchartsStatus: Pending replyStatus: Stale
Expected behaviour
Converting a JavaScript Date to a number should retain its complete numeric value, matching Date#getTime() and ordinary numeric coercion.
Actual behaviour
DataConverterUtils.asNumber calls Date#getDate(), so every Date becomes only its local day-of-month value from 1 through 31. Different dates frequently collapse to the same number and time/month/year information is lost.
Live demo with steps to reproduce
const date = new Date('2020-01-09T12:34:56Z');
console.log(DataConverterUtils.asNumber(date)); // 9, expected 1578573296000Product version
Highcharts master 48b5b3e99a0fa9aae9a357165a5a916f504afeca / 13.0.2
Affected browser(s)
All JavaScript environments.
Source: highcharts/highcharts