SAP-BTP-Spielwiese/app1/node_modules/validator/es/lib/isBefore.js
Markus Rettig 775ac7b58c completed step 3 from the tutorial
you must login with an BTP account in order to see the app
2024-02-08 16:13:36 +01:00

9 lines
No EOL
367 B
JavaScript

import assertString from './util/assertString';
import toDate from './toDate';
export default function isBefore(str) {
var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());
assertString(str);
var comparison = toDate(date);
var original = toDate(str);
return !!(original && comparison && original < comparison);
}