Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 7c30a16

Browse files
committed
remove moment.js and use date-fns
1 parent 1d245f3 commit 7c30a16

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

components/row-events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { Card, Icon } from 'semantic-ui-react';
3-
import moment from 'moment';
3+
import format from 'date-fns/format';
44

55
const RowEvent = props => {
66
return (
@@ -16,7 +16,7 @@ const RowEvent = props => {
1616
<Card.Content extra>
1717
<span className="card_icons">
1818
<Icon name="clock" />
19-
{moment(props.time).format("h:mm A, ddd MMM Do 'YY")}
19+
{format(props.time, "h:mm A, ddd MMM Do 'YY")}
2020
</span>
2121
<span className="card_icons">
2222
<Icon name="users" />

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
"author": "Vinay Puppal <[email protected]> (https://www.vinaypuppal.com/)",
4545
"license": "BSD",
4646
"dependencies": {
47+
"date-fns": "1.29.0",
4748
"feathers-rest": "^1.8.0",
4849
"isomorphic-unfetch": "2.0.0",
49-
"moment": "^2.19.1",
5050
"next": "^4.1.0",
5151
"nprogress": "^0.2.0",
5252
"prop-types": "^15.5.10",

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ dashdash@^1.12.0:
17771777
dependencies:
17781778
assert-plus "^1.0.0"
17791779

1780-
date-fns@^1.27.2:
1780+
date-fns@1.29.0, date-fns@^1.27.2:
17811781
version "1.29.0"
17821782
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6"
17831783

@@ -4322,7 +4322,7 @@ modify-values@^1.0.0:
43224322
version "1.0.0"
43234323
resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2"
43244324

4325-
moment@^2.11.2, moment@^2.19.1:
4325+
moment@^2.11.2:
43264326
version "2.19.1"
43274327
resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.1.tgz#56da1a2d1cbf01d38b7e1afc31c10bcfa1929167"
43284328

0 commit comments

Comments
 (0)