Skip to content

Commit 20d7b8c

Browse files
authored
Use Timestamp in Date fields (#33)
1 parent 3c6333a commit 20d7b8c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

firestore/main/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function dataTypes(db) {
179179
stringExample: 'Hello, World!',
180180
booleanExample: true,
181181
numberExample: 3.14159265,
182-
dateExample: new Date('December 10, 1815'),
182+
dateExample: admin.firestore.Timestamp.fromDate(new Date('December 10, 1815')),
183183
arrayExample: [5, true, 'hello'],
184184
nullExample: null,
185185
objectExample: {

firestore/main/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"author": "",
1111
"license": "ISC",
1212
"dependencies": {
13-
"@google-cloud/firestore": "^0.19.0",
14-
"firebase-admin": "^6.4.0"
13+
"@google-cloud/firestore": "^0.21.0",
14+
"firebase-admin": "^6.5.1"
1515
},
1616
"devDependencies": {
1717
"mocha": "^3.3.0"

0 commit comments

Comments
 (0)