Skip to content

Commit bad9435

Browse files
committed
Use docker image Node 8.7 with Yarn 1.2.0
1 parent d534bcd commit bad9435

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# DEV BUILD STEP
2-
FROM node:8.5-alpine as devBuild
2+
FROM node:8.7-alpine as devBuild
33
WORKDIR /usr/src/app
44

55
# Copy the source and build
@@ -9,7 +9,7 @@ RUN yarn run build
99

1010
# PROD BUILD STEP
1111
# Using latest LTS release of Node (comes with Yarn package manager by default)
12-
FROM node:8.5-alpine
12+
FROM node:8.7-alpine
1313

1414
# Create an app directory on the container
1515
WORKDIR /usr/src/app

src/helpers/convertNumberToTimeAgo.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export default (number) => {
2-
const date = new Date(number);
3-
const now = new Date();
4-
const timeAgo = now.valueOf() - date.valueOf();
2+
const now = +new Date();
3+
const timeAgo = now - number;
54

65
const ONE_YEAR = 3.154e+10;
76
const ONE_MONTH = 2.628e+9;

0 commit comments

Comments
 (0)