The road to zero TypeScript errors (#1756)

* Type fixes

* Type fixes

* Type fixes

* Type fixes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Omar Lópezandkodiakhq[bot] authored and GitHub committed 2022-02-10 10:44:46 +00:00
1 parent 798930bf23
commit 5d0ba3dafc
14 files changed
+54 -53

No files matched your search

+4 -4
View File
@@ -23,22 +23,22 @@ export function parseZone(
date,
{
utc: true,
...format,
...(typeof format === "string" ? { format } : { ...format }),
},
locale,
strict
);
}
const [, dateTime, sign, tzHour, tzMinute] = match;
const uOffset: number = tzHour * 60 + parseInt(tzMinute, 10);
const uOffset: number = parseInt(tzHour) * 60 + parseInt(tzMinute, 10);
const offset = sign === "+" ? uOffset : -uOffset;
return dayjs(
dateTime,
{
$offset: offset,
...format,
} as dayjs.OptionType,
...(typeof format === "string" ? { format } : { ...format }),
} as dayjs.OptionType & { $offset: number },
locale,
strict
);