Merge pull request #1530 from Safelite/featre/digital/CSR-1788

Update date-helper.js
This commit is contained in:
hiteshkumar87 2023-11-15 16:57:10 +05:30 committed by GitHub
commit fcfd6daba7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ export function getDateDifferenceInDays(startDate, endDate) {
// Use the built-in method to get the difference in milliseconds
var difference = date1 - date2;
// Convert milliseconds to days and return the result
return Math.floor(difference / (1000 * 3600 * 24));
return Math.round(difference / (1000 * 3600 * 24));
}
export function get12HourTimeFormat(time) {
// Check correct time format and split into components