Stats: Dates have a `0` appended
Impacted plugin
Jetpack
Quick summary
In the Jetpack stats on my site's backend, all the dates seem to have a 0 appended to the day of the month. eg. May 21 is displayed as May 210. I've attached a couple screenshots.
Steps to reproduce
View the Jetpack stats screen in a self-hosted WordPress site.
A clear and concise description of what you expected to happen.
I expected the dates to be formatted correctly.
What actually happened
A 0 is added to the day of the month on most instances of the date.
Impact
One
Available workarounds?
There is no user impact
Platform (Simple and/or Atomic)
No response
Logs or notes
No response
Thanks for the report!
Could you go to Settings > General in your dashboard, and let us know what the date format settings are there? is there a 0 appended to the date format there maybe?
Potentially related: #37444
My site's date settings are F jS, Y.
Thank you! We'll take a look at this!
Potentially related: #37444
Yeah, I noticed this issue before I posted mine, and when I noticed the 0 in the mouseover dates shown in #37444 I wondered if it might be somehow related. Thanks!
Hey @pjohanneson 👋 — Are you still able to reproduce this?
I'm not able to reproduce in my testing so I'm wondering if it's possibly been fixed in recent updates to the Stats dashboard as there have been many. If you are still seeing it, can you please let me know the version of the Jetpack plugin you have installed and the language setting from Settings → General → Site Language?
Thanks!
Notes:
- The date is generated based on the URL params. Either
startDate=YYYY-MM-DDorundefined. - If undefined, a date is generated based on the current period and the
gmt_offsetfrom the site options. - When formatting the date for output, we do not respect the user preference in Settings → General. We currently default to the
LLformat as provided by Moment.js.
It looks like a recent update has fixed the issue. I had noticed it sometime last week when I checked my stats, but today the dates appear normal (ie, "September 26", not "September 260"). I'm closing this now as it's been fixed. Thanks!