We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 360815f commit 7a8c5dcCopy full SHA for 7a8c5dc
1 file changed
src/date.ts
@@ -1,21 +1,21 @@
1
import type { Faker } from '.';
2
import type { DateEntryDefinition } from './definitions';
3
4
-const toDate = (date?: string | Date): Date => {
+function toDate(date?: string | Date): Date {
5
if (date != null) {
6
return new Date(date instanceof Date ? date : Date.parse(date));
7
}
8
9
return new Date();
10
-};
+}
11
12
-const toMilliseconds = (date?: string | Date): number => {
+function toMilliseconds(date?: string | Date): number {
13
14
return date instanceof Date ? date.getTime() : Date.parse(date);
15
16
17
return new Date().getTime();
18
19
20
/**
21
* Module to generate dates.
0 commit comments