From 9ad0ef376c9c509c3f47f26c707aa6a1a747a294 Mon Sep 17 00:00:00 2001 From: Sean O'Bannon Date: Fri, 23 Sep 2022 10:58:40 -0500 Subject: [PATCH] readme --- README | 13 +++++++++++++ fastParseZone.js | 11 ----------- 2 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 README delete mode 100644 fastParseZone.js diff --git a/README b/README new file mode 100644 index 0000000..ee66a83 --- /dev/null +++ b/README @@ -0,0 +1,13 @@ +We have a list of millions of dates, stored in a database. + +We'd like to convert these dates to a moment object, so we can perform date calculations on them. + +We need the objects to stay in their local timezone, so we're using `moment.parseZone()` to convert them. + +However, we're seeing very long parse times, and we'd like to speed them up. + +We need to improve the performance of `moment.parseZone()`. Let's see if we can do it! + +`benchmarks.js` contains a benchmark suite. + +`index.js` is some example code that we can use outside the context of a benchmark. diff --git a/fastParseZone.js b/fastParseZone.js deleted file mode 100644 index 41e1cd9..0000000 --- a/fastParseZone.js +++ /dev/null @@ -1,11 +0,0 @@ -import moment from 'moment'; - -/** - * Parses an ISO-8601 formatted date in this format only: - * - "2022-12-03T12:30:00.000-07:00" - * - * Returns a Moment.JS object (moment) - */ -export function fastParseZone(input) { - -}