Skip to content

Commit 36a8c2a

Browse files
committed
chore: Code cleanup
1 parent 9261649 commit 36a8c2a

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/VueDatePicker/utils/timezone.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ export const getTimezoneOffset = (timezone?: string, localDate?: Date) => {
4343
const utcDate = new Date(date.toLocaleString('en-US', { timeZone: 'UTC' }));
4444
const specificDate = new Date(date.toLocaleString('en-US', { timeZone: timezone }));
4545
const dateToOffset = isDST(localDate ?? specificDate) ? specificDate : (localDate ?? specificDate);
46-
const dstOffset = dateToOffset!.getTimezoneOffset() / 60;
46+
const dstOffset = dateToOffset.getTimezoneOffset() / 60;
4747
return (+utcDate - +specificDate) / (1000 * 60 * 60) - dstOffset;
4848
};

tests/unit/behaviour.spec.ts

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ describe('It should validate various picker scenarios', () => {
9595
it('Should not switch calendars in 1 month range with multi-calendars enabled (#472)', async () => {
9696
const start = set(new Date(), { month: 5 });
9797
const dp = await openMenu({ multiCalendars: true, range: true, startDate: start });
98-
// const firstDate = resetDateTime(start);
9998
const end = set(start, { month: getMonth(addMonths(start, 1)), date: 15 });
10099

101100
const firstDateEl = getCalendarCell(dp, start);

0 commit comments

Comments
 (0)