Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LB-611: The week date shown on the page ends up on a Tuesday #899

Merged
merged 1 commit into from Jun 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions listenbrainz/webserver/static/js/src/stats/UserHistory.tsx
Expand Up @@ -377,16 +377,22 @@ export default class UserHistory extends React.Component<
</ul>
</span>
{range === "week"
? `of ${startDate.getDate()} ${startDate.toLocaleString(
? `of ${startDate.getUTCDate()} ${startDate.toLocaleString(
"en-us",
{ month: "long" }
{ month: "long", timeZone: "UTC" }
)} `
: ""}
{range === "month"
? `${startDate.toLocaleString("en-us", { month: "long" })} `
? `${startDate.toLocaleString("en-us", {
month: "long",
timeZone: "UTC",
})} `
: ""}
{range !== "all_time"
? startDate.toLocaleString("en-us", { year: "numeric" })
? startDate.toLocaleString("en-us", {
year: "numeric",
timeZone: "UTC",
})
: ""}
</h3>
</div>
Expand Down