Skip to content

Commit 5375f17

Browse files
authored
refactor: implement suggestion new Date
1 parent 7799d9b commit 5375f17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/isAfter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default function isAfter(str, options) {
66

77
// accessing 'arguments' for backwards compatibility: isAfter(str [, date])
88
// eslint-disable-next-line prefer-rest-params
9-
const date = (typeof options === 'object' ? options.date : arguments[1]) || String(new Date());
9+
const date = (typeof options === 'object' ? options.date : arguments[1]) || Date().toString();
1010

1111
const comparison = toDate(date);
1212
const original = toDate(str);

0 commit comments

Comments
 (0)