{\itshape Date} instance\hypertarget{md_sfcode_node_modules_ext_node_modules_type_docs_date_autotoc_md9932}{}\doxysection{$<$tt$>$date/is$<$/tt$>$}\label{md_sfcode_node_modules_ext_node_modules_type_docs_date_autotoc_md9932}
Confirms if given object is a native date, and is not an {\itshape Invalid Date}


\begin{DoxyCode}{0}
\DoxyCodeLine{const isDate = require("{}type/date/is"{});}
\DoxyCodeLine{}
\DoxyCodeLine{isDate(new Date()); // true}
\DoxyCodeLine{isDate(new Date("{}Invalid date"{})); // false}
\DoxyCodeLine{isDate(Date.now()); // false}
\DoxyCodeLine{isDate("{}foo"{}); // false }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_ext_node_modules_type_docs_date_autotoc_md9933}{}\doxysection{$<$tt$>$date/ensure$<$/tt$>$}\label{md_sfcode_node_modules_ext_node_modules_type_docs_date_autotoc_md9933}
If given argument is a date object, it is returned back. Otherwise {\ttfamily Type\+Error} is thrown.


\begin{DoxyCode}{0}
\DoxyCodeLine{const ensureDate = require("{}type/date/ensure"{});}
\DoxyCodeLine{}
\DoxyCodeLine{const date = new Date();}
\DoxyCodeLine{ensureDate(date); // date}
\DoxyCodeLine{ensureDate(123123); // Thrown TypeError: 123123 is not a date object }

\end{DoxyCode}
 