summaryrefslogtreecommitdiff
path: root/tz.js
diff options
context:
space:
mode:
Diffstat (limited to 'tz.js')
-rw-r--r--tz.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/tz.js b/tz.js
new file mode 100644
index 0000000..59c75bb
--- /dev/null
+++ b/tz.js
@@ -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
+};
+
+