Update date-helper.js
replacing Math.floor with Math.round
This commit is contained in:
parent
d5022a6152
commit
5a77323820
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue