diff options
Diffstat (limited to 'tz.js')
-rw-r--r-- | tz.js | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -0,0 +1,10 @@ +const { timezones } = require('./timezones.json'); +module.exports = { + lookup (name) { + const casefolded = name.toLowerCase(); + return timezones.find(it => it.code.toLowerCase() === casefolded); + }, + timezones +}; + + |