mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
utils: new Date().getTime() --> Date.now()
This commit is contained in:
parent
e17111a859
commit
7570b0dee4
1 changed files with 1 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ import { lookupNip05Cached } from '@/nip05.ts';
|
|||
import { getAuthor } from '@/queries.ts';
|
||||
|
||||
/** Get the current time in Nostr format. */
|
||||
const nostrNow = () => Math.floor(new Date().getTime() / 1000);
|
||||
const nostrNow = () => Math.floor(Date.now() / 1000);
|
||||
/** Convenience function to convert Nostr dates into native Date objects. */
|
||||
const nostrDate = (seconds: number) => new Date(seconds * 1000);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue