Skip to content

Commit

Permalink
fix(ui): fix DatePickr test for non-US locale
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Aug 28, 2024
1 parent 95b131a commit 9b4a060
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ describe("DateTimePicker", () => {
const today = new Date()
const yesterday = new Date()
yesterday.setDate(yesterday.getDate() - 1)
const fullMonth = yesterday.toLocaleString("default", { month: "long" })
const fullMonth = yesterday.toLocaleString("en-US", { month: "long" })
const day = yesterday.getDate()
const fullYear = yesterday.getFullYear()
const yesterdayLabel = `${fullMonth} ${day}, ${fullYear}`
Expand All @@ -761,7 +761,7 @@ describe("DateTimePicker", () => {
const today = new Date()
const tomorrow = new Date()
tomorrow.setDate(tomorrow.getDate() + 1)
const fullMonth = tomorrow.toLocaleString("default", { month: "long" })
const fullMonth = tomorrow.toLocaleString("en-US", { month: "long" })
const day = tomorrow.getDate()
const fullYear = tomorrow.getFullYear()
const tomorrowLabel = `${fullMonth} ${day}, ${fullYear}`
Expand All @@ -783,7 +783,7 @@ describe("DateTimePicker", () => {
const today = new Date()
const tomorrow = new Date()
tomorrow.setDate(tomorrow.getDate() + 1)
const tomorrowFullMonth = tomorrow.toLocaleString("default", {
const tomorrowFullMonth = tomorrow.toLocaleString("en-US", {
month: "long",
})
const tomorrowDay = tomorrow.getDate()
Expand All @@ -807,7 +807,7 @@ describe("DateTimePicker", () => {
const today = new Date()
const tomorrow = new Date()
tomorrow.setDate(tomorrow.getDate() + 1)
const todayFullMonth = today.toLocaleString("default", { month: "long" })
const todayFullMonth = today.toLocaleString("en-US", { month: "long" })
const todayDay = today.getDate()
const todayFullYear = today.getFullYear()
const todayLabel = `${todayFullMonth} ${todayDay}, ${todayFullYear}`
Expand Down Expand Up @@ -889,7 +889,7 @@ describe("DateTimePicker", () => {
const today = new Date()
const tomorrow = new Date()
tomorrow.setDate(tomorrow.getDate() + 1)
const tomorrowFullMonth = tomorrow.toLocaleString("default", {
const tomorrowFullMonth = tomorrow.toLocaleString("en-US", {
month: "long",
})
const tomorrowDay = tomorrow.getDate()
Expand Down

0 comments on commit 9b4a060

Please sign in to comment.