mirror of
https://github.com/web3privacy/web
synced 2024-10-15 18:26:27 +02:00
8 lines
No EOL
174 B
JavaScript
8 lines
No EOL
174 B
JavaScript
import { isPast } from 'date-fns';
|
|
|
|
export function isFutureDate (dt) {
|
|
if (dt.match(/^\d{4}-\d{2}-\d{2}$/) && isPast(new Date(dt))) {
|
|
return false
|
|
}
|
|
return true
|
|
} |