Skip to content

Commit

Permalink
Fixing zones in Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
icambron committed Nov 20, 2017
1 parent 9e08f0f commit 4286031
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 32 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

# 0.0.21
* Fix zones for Edge

## 0.0.20
* Fix `fromISO` to accept various levels of subsecond precision

Expand Down
65 changes: 36 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "luxon",
"version": "0.0.20",
"version": "0.0.21",
"description": "Immutable date wrapper",
"author": "Isaac Cambron",
"keywords": ["date", "immutable"],
Expand Down
4 changes: 2 additions & 2 deletions src/zones/IANAZone.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const typeToPos = {
};

function hackyOffset(dtf, date) {
const formatted = dtf.format(date),
parsed = /(\d+)\/(\d+)\/(\d+), (\d+):(\d+):(\d+)/.exec(formatted),
const formatted = dtf.format(date).replace(/\u200E/g, ''),
parsed = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted),
[, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed;
return [fYear, fMonth, fDay, fHour, fMinute, fSecond];
}
Expand Down

0 comments on commit 4286031

Please sign in to comment.