File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -318,11 +318,11 @@ function drawChart(options, series) {
318318
319319 const changelog = flags [ this . x ] ;
320320
321- // Drop the 1st day from dates as data is for month, rather than
322- // specific date. However, include the non-01 dates from when we
323- // used to run an early (01) and late (15 typically) crawl .
324- const formattedDate = Highcharts . dateFormat ( '%e' , this . x ) === ' 1' ?
325- Highcharts . dateFormat ( '%b %Y' , this . x ) :
321+ // Use short format (month + year) for dates from 2019 onwards when
322+ // we switched to monthly crawls. Show full date for older data that
323+ // may have had mid-month crawls .
324+ const formattedDate = this . x >= Date . UTC ( 2019 , 0 , 1 ) ?
325+ Highcharts . dateFormat ( '%b %Y' , this . x ) :
326326 Highcharts . dateFormat ( '%b %e, %Y' , this . x ) ;
327327 const tooltip = `<p style="font-size: smaller; text-align: center;">${ formattedDate } </p>` ;
328328
You can’t perform that action at this time.
0 commit comments