Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fromUTC(utc: number): ZoneInfoRec {
const i = binarySearch(this.untils, true, utc);
const type = i === -1 ? 0 : this.types[i];
return this.localtime[type];
}
get(bundle: Bundle, minutes: number): DayPeriodType | undefined {
const raw = dayPeriodRules[bundle.languageRegion()] || dayPeriodRules[bundle.language()];
if (raw === undefined) {
return undefined;
}
const rule = this.cache.get(raw);
const i = binarySearch(rule.minutes, true, minutes);
return rule.keys[i];
}