Skip to content
This repository was archived by the owner on Oct 18, 2025. It is now read-only.

Commit 96d7696

Browse files
committed
v.1.0.3: Update docs
1 parent dde5bbb commit 96d7696

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,20 +169,16 @@ Returns the updated document with an additional `_id` and `_path` fields.
169169

170170
## Using timestamps
171171

172-
Firestore timestamps are not implemented in this library. If you need to use
173-
timestamps, here's how you can do it:
174-
175-
```bash
176-
deno add npm:firebase/firestore
177-
```
178-
179-
...and then use the `Timestamp` class from the `firebase/firestore` package:
172+
If you need to use Firestore timestamps, simply use `Date` objects, e.g.:
180173

181174
```typescript
182-
import { Timestamp } from "npm:firebase/firestore";
175+
const now = new Date();
183176

184-
// e.g.
185-
const timestamp = Timestamp.now();
177+
// ...and then use it in your document:
178+
179+
await firestore.createDocument("my-collection", {
180+
createdAt: now,
181+
});
186182
```
187183

188-
> Note: The same principle applies to `UnionArray` field operations, etc.
184+
The above will be converted to a Firestore timestamp automatically.

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@koiztech/firestore-admin",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"exports": "./mod.ts",
55
"tasks": {
66
"dev": "deno run --watch --env mod.ts",

0 commit comments

Comments
 (0)