Skip to content

Commit 68cbe7c

Browse files
committed
Force post dates in 2019
1 parent aad2235 commit 68cbe7c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/resolvers/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ export default {
7575
title,
7676
body,
7777
published: faker.random.boolean(),
78-
createdAt: faker.date.past(),
78+
createdAt: faker.date.between(
79+
new Date('2019-01-01'),
80+
new Date('2019-12-31'),
81+
),
7982
author: {
8083
id: scuid(),
8184
firstName,
@@ -104,7 +107,10 @@ export default {
104107
title,
105108
body,
106109
published: faker.random.boolean(),
107-
createdAt: faker.date.past(),
110+
createdAt: faker.date.between(
111+
new Date('2019-01-01'),
112+
new Date('2019-12-31'),
113+
),
108114
author: user,
109115
likelyTopics: likelyTopics(`${firstName} ${lastName}`, title, body),
110116
}

0 commit comments

Comments
 (0)