mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-25 09:14:25 +01:00
utils: new Date().getTime() --> Date.now()
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user