Skip to content

Commit

Permalink
Replace moment with moment-timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmeuli committed May 29, 2020
1 parent cf3a5ee commit 3991454
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 26 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@types/draft-js": "^0.10.40",
"@types/electron-settings": "^3.1.1",
"@types/lodash.debounce": "^4.0.6",
"@types/moment-timezone": "^0.5.13",
"@types/node": "^14.0.1",
"@types/react": "^16.9.35",
"@types/react-dom": "^16.9.8",
Expand All @@ -68,7 +69,7 @@
"markdown-draft-js": "^2.2.0",
"minireset.css": "^0.0.6",
"minisearch": "^2.3.1",
"moment": "^2.22.2",
"moment-timezone": "^0.5.31",
"move-file": "^2.0.0",
"react": "^16.13.1",
"react-day-picker": "github:samuelmeuli/react-day-picker",
Expand Down Expand Up @@ -96,7 +97,6 @@
"@types/html-webpack-plugin": "^3.2.2",
"@types/jest": "^25.2.1",
"@types/license-checker-webpack-plugin": "^0.0.2",
"@types/moment-timezone": "^0.5.13",
"@types/webpack": "^4.41.12",
"@types/webpack-merge": "^4.1.5",
"@typescript-eslint/eslint-plugin": "^2.33.0",
Expand All @@ -118,7 +118,6 @@
"jest": "^26.0.1",
"license-checker-webpack-plugin": "^0.1.4",
"mockdate": "^2.0.3",
"moment-timezone": "^0.5.28",
"npm-run-all": "^4.1.3",
"prettier": "^1.18.2",
"sass": "^1.26.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import React, { ReactElement } from "react";
import countWords from "word-count";

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/elements/editor/editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import createListPlugin from "draft-js-list-plugin";
import PluginEditor from "draft-js-plugins-editor";
import debounce from "lodash.debounce";
import { draftToMarkdown, markdownToDraft } from "markdown-draft-js";
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import React, { KeyboardEvent, PureComponent, ReactNode } from "react";

import { Entries, IndexDate } from "../../../../types";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PrevIcon from "feather-icons/dist/icons/chevron-left.svg";
import NextIcon from "feather-icons/dist/icons/chevron-right.svg";
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import React, { ReactElement } from "react";

import { MAX_DATE, MIN_DATE } from "../../../../constants";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import React, { PureComponent, ReactNode } from "react";
import DayPicker from "react-day-picker";
import MomentLocaleUtils from "react-day-picker/moment";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import { connect } from "react-redux";

import { setDateSelected } from "../../../../store/diary/actionCreators";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ClearIcon from "feather-icons/dist/icons/x.svg";
import debounce from "lodash.debounce";
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import React, { ChangeEvent, PureComponent, ReactNode } from "react";

import TodayIcon from "../../../../assets/icons/today.svg";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import { connect } from "react-redux";

import { search, setDateSelected } from "../../../../store/diary/actionCreators";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import React, { PureComponent, ReactNode } from "react";

import { Entries } from "../../../../types";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import { connect } from "react-redux";

import { setDateSelected } from "../../../../store/diary/actionCreators";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logger from "electron-log";
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import React, { ChangeEvent, FormEvent, ReactElement, useState } from "react";

import { createDate, fromIndexDate, toIndexDate } from "../../../utils/dateFormat";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import { connect } from "react-redux";

import { closeOverlay } from "../../../store/app/actionCreators";
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/diary/actionCreators.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Moment } from "moment";
import { Moment } from "moment-timezone";

import { MAX_DATE, MIN_DATE } from "../../constants";
import { createDate, parseDate } from "../../utils/dateFormat";
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/diary/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Moment } from "moment";
import { Moment } from "moment-timezone";
import { Action } from "redux";

// State
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/utils/dateFormat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import moment, { Moment, MomentFormatSpecification } from "moment";
import moment, { Moment, MomentFormatSpecification } from "moment-timezone";

import { IndexDate } from "../types";

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/utils/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import moment from "moment";
import moment from "moment-timezone";

import { Translations } from "../../shared/types";
import { getLang, getTranslation, getTranslations } from "../electron/ipcRenderer/senders";
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7545,17 +7545,17 @@ modify-filename@^1.1.0:
resolved "https://registry.yarnpkg.com/modify-filename/-/modify-filename-1.1.0.tgz#9a2dec83806fbb2d975f22beec859ca26b393aa1"
integrity sha1-mi3sg4Bvuy2XXyK+7IWcoms5OqE=

moment-timezone@^0.5.28:
version "0.5.28"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.28.tgz#f093d789d091ed7b055d82aa81a82467f72e4338"
integrity sha512-TDJkZvAyKIVWg5EtVqRzU97w0Rb0YVbfpqyjgu6GwXCAohVRqwZjf4fOzDE6p1Ch98Sro/8hQQi65WDXW5STPw==
moment-timezone@^0.5.31:
version "0.5.31"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.31.tgz#9c40d8c5026f0c7ab46eda3d63e49c155148de05"
integrity sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==
dependencies:
moment ">= 2.9.0"

"moment@>= 2.9.0", moment@>=2.14.0, moment@^2.22.2:
version "2.24.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==
"moment@>= 2.9.0", moment@>=2.14.0:
version "2.26.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.26.0.tgz#5e1f82c6bafca6e83e808b30c8705eed0dcbd39a"
integrity sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw==

move-concurrently@^1.0.1:
version "1.0.1"
Expand Down

0 comments on commit 3991454

Please sign in to comment.