Merge pull request #2166 from Safelite/feature/loadSessionDate
date functions use client browser for date parts
This commit is contained in:
commit
137f5b4b70
2 changed files with 7 additions and 9 deletions
|
|
@ -2100,15 +2100,10 @@ export const actions = {
|
||||||
) {
|
) {
|
||||||
const order = context.state.order;
|
const order = context.state.order;
|
||||||
|
|
||||||
var dt = new Date(referralDate);
|
var dtParts = referralDate.split("-");
|
||||||
var month = "" + (dt.getMonth() + 1);
|
const year = dtParts[0];
|
||||||
var day = "" + dt.getDate();
|
const month = dtParts[1];
|
||||||
const year = dt.getFullYear();
|
const day = dtParts[2].substring(0, 2);
|
||||||
|
|
||||||
if (month.length < 2)
|
|
||||||
month = "0" + month;
|
|
||||||
if (day.length < 2)
|
|
||||||
day = "0" + day;
|
|
||||||
|
|
||||||
const loadDate = `${year}-${month}-${day}`;
|
const loadDate = `${year}-${month}-${day}`;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -784,6 +784,7 @@ describe("Actions", () => {
|
||||||
const response = await actions.loadSession(context, {
|
const response = await actions.loadSession(context, {
|
||||||
payload: {
|
payload: {
|
||||||
savedSessionId: "",
|
savedSessionId: "",
|
||||||
|
referralDate: "2024-12-11T00:29:41.967",
|
||||||
},
|
},
|
||||||
pageNameToLog: "test",
|
pageNameToLog: "test",
|
||||||
});
|
});
|
||||||
|
|
@ -813,6 +814,7 @@ describe("Actions", () => {
|
||||||
const response = await actions.loadSession(context, {
|
const response = await actions.loadSession(context, {
|
||||||
payload: {
|
payload: {
|
||||||
savedSessionId: "",
|
savedSessionId: "",
|
||||||
|
referralDate: "2024-12-11T00:29:41.967",
|
||||||
},
|
},
|
||||||
pageNameToLog: "test",
|
pageNameToLog: "test",
|
||||||
});
|
});
|
||||||
|
|
@ -841,6 +843,7 @@ describe("Actions", () => {
|
||||||
const response = await actions.loadSession(context, {
|
const response = await actions.loadSession(context, {
|
||||||
payload: {
|
payload: {
|
||||||
savedSessionId: "",
|
savedSessionId: "",
|
||||||
|
referralDate: "2024-12-11T00:29:41.967",
|
||||||
},
|
},
|
||||||
pageNameToLog: "test",
|
pageNameToLog: "test",
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue