feat: Use prettier-eslint to format code
This commit is contained in:
committed by
mrugesh mohapatra
parent
1ba67c4e2b
commit
b13e5fb41a
@ -3,9 +3,16 @@ import moment from 'moment-timezone';
|
||||
// day count between two epochs (inclusive)
|
||||
export function dayCount([head, tail], timezone = 'UTC') {
|
||||
return Math.ceil(
|
||||
moment(moment(head).tz(timezone).endOf('day')).diff(
|
||||
moment(tail).tz(timezone).startOf('day'),
|
||||
moment(
|
||||
moment(head)
|
||||
.tz(timezone)
|
||||
.endOf('day')
|
||||
).diff(
|
||||
moment(tail)
|
||||
.tz(timezone)
|
||||
.startOf('day'),
|
||||
'days',
|
||||
true)
|
||||
true
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user