UX: displays full date time when displaying ranges (#9386)

This commit is contained in:
Joffrey JAFFEUX 2020-04-08 11:44:06 +02:00 committed by GitHub
parent 6d0ba74b98
commit 6171141211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 11 deletions

View File

@ -154,9 +154,9 @@ export default class LocalDateBuilder {
} else {
const endRange = startRange.add(24, "hours");
return [
startRange.format(this.format || "LLLL"),
startRange.format("LLLL"),
RANGE_SEPARATOR,
endRange.format(this.format || "LLLL")
endRange.format("LLLL")
].join(" ");
}
}

View File

@ -308,7 +308,8 @@ QUnit.test("previews", assert => {
previews: [
{
current: true,
formated: "March 22, 2020 → March 23, 2020",
formated:
"Sunday, March 22, 2020 12:00 AM → Monday, March 23, 2020 12:00 AM",
timezone: "Paris"
}
]
@ -323,11 +324,13 @@ QUnit.test("previews", assert => {
previews: [
{
current: true,
formated: "March 22, 2020 → March 23, 2020",
formated:
"Sunday, March 22, 2020 12:00 AM → Monday, March 23, 2020 12:00 AM",
timezone: "Paris"
},
{
formated: "March 23, 2020 → March 23, 2020",
formated:
"Monday, March 23, 2020 10:00 AM → Monday, March 23, 2020 10:00 AM",
timezone: "Sydney"
}
]
@ -342,7 +345,8 @@ QUnit.test("previews", assert => {
previews: [
{
current: true,
formated: "March 22, 2020 → March 23, 2020",
formated:
"Sunday, March 22, 2020 12:00 AM → Monday, March 23, 2020 12:00 AM",
timezone: "Paris"
}
]
@ -357,7 +361,8 @@ QUnit.test("previews", assert => {
previews: [
{
current: true,
formated: "March 22, 2020 → March 23, 2020",
formated:
"Sunday, March 22, 2020 12:00 AM → Monday, March 23, 2020 12:00 AM",
timezone: "Paris"
}
]
@ -372,7 +377,8 @@ QUnit.test("previews", assert => {
previews: [
{
current: true,
formated: "March 22, 2020 → March 23, 2020",
formated:
"Sunday, March 22, 2020 12:00 AM → Monday, March 23, 2020 12:00 AM",
timezone: "Paris"
}
]
@ -402,15 +408,18 @@ QUnit.test("previews", assert => {
previews: [
{
current: true,
formated: "April 7, 2020 → April 8, 2020",
formated:
"Tuesday, April 7, 2020 12:00 AM → Wednesday, April 8, 2020 12:00 AM",
timezone: "Paris"
},
{
formated: "April 7, 2020 → April 7, 2020",
formated:
"Tuesday, April 7, 2020 11:00 PM → Tuesday, April 7, 2020 11:00 PM",
timezone: "London"
},
{
formated: "April 7, 2020 → April 7, 2020",
formated:
"Tuesday, April 7, 2020 11:00 PM → Tuesday, April 7, 2020 11:00 PM",
timezone: "Lagos"
}
]