JAVASCRIPT   54

isDate

Guest on 1st May 2022 04:42:50 PM

  1. export default function isDate(input) {
  2.     return (
  3.         input instanceof Date ||
  4.         Object.prototype.toString.call(input) === '[object Date]'
  5.     );
  6. }

Raw Paste


Login or Register to edit or fork this paste. It's free.