UNPKG

@abuhasanrumi/timezone-to-country

Version:
17 lines (12 loc) 358 B
import timezones from '../data/timezone-data' function getTimezoneInfo(timezone) { const match = timezones.find(tz => tz.name === timezone) if (!match) return null const { code: countryCode, country: countryName, continent: continentName } = match return { countryCode, countryName, continentName } } export default getTimezoneInfo