Skip to content
Snippets Groups Projects
Commit b48c5bee authored by Aaron Dötsch's avatar Aaron Dötsch
Browse files

changes

parent f5755a82
Branches
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@
function getValidityStatus(startDate: string, endDate: string, currentDate: number): number{
if(startDate && endDate){
let started = Date.parse(startDate) <= currentDate;
let ended = Date.parse(endDate) <= currentDate;
let ended = (Date.parse(endDate) + 86_400_000) <= currentDate;
if(ended) return OpeningStatus.ENDED;
else if(started) return OpeningStatus.VALID;
else return OpeningStatus.STARTING_SOON;
......@@ -22,7 +22,7 @@
if(Date.parse(startDate) <= currentDate) return OpeningStatus.VALID;
else return OpeningStatus.STARTING_SOON;
}else if(endDate){
if(Date.parse(endDate) <= currentDate) return OpeningStatus.ENDED;
if((Date.parse(endDate) + 86_400_00) <= currentDate) return OpeningStatus.ENDED;
else return OpeningStatus.VALID;
}
return OpeningStatus.VALID;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment