You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can check out the source code of date-fns/isBefore and see how they do it.
exportdefaultfunctionisBefore(dirtyDate,dirtyDateToCompare,dirtyOptions){if(arguments.length<2){thrownewTypeError('2 arguments required, but only '+arguments.length+' present')}vardate=toDate(dirtyDate,dirtyOptions)vardateToCompare=toDate(dirtyDateToCompare,dirtyOptions)returndate.getTime()<dateToCompare.getTime()}
How would I achieve something like this in native javascript :
moment(viewingDay).isBefore(moment(), 'day');
If this is possible then I can fully ditch moment
The text was updated successfully, but these errors were encountered: