/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
function e(e){return null!==n(e)}function n(e){return s(e)??t(e)??u(e)}function t(e){const n=new Date(e),t=n.getTime();return Number.isNaN(t)?null:e.toLowerCase()===n.toUTCString().toLowerCase()?t:null}function s(e){const n=o.exec(e);if(!n?.groups)return null;const t=n.groups,s=+t.year,u=+t.month-1,r=+t.day,i=+(t.hours??"0"),f=+(t.minutes??"0"),d=+(t.seconds??"0");if(i>23)return null;if(f>59)return null;if(d>59)return null;const l=t.ms??"0",c=l?+l.padEnd(3,"0").slice(0,3):0;let a;if(t.isUTC||!t.offsetSign)a=Date.UTC(s,u,r,i,f,d,c);else{const e=+t.offsetHours,n=+t.offsetMinutes;a=6e4*("+"===t.offsetSign?-1:1)*(60*e+n)+Date.UTC(s,u,r,i,f,d,c)}return Number.isNaN(a)?null:a}function u(e){if(!r.test(e))return null;const n=new Date(e);return Number.isNaN(n.getTime())?null:n.getTime()-6e4*n.getTimezoneOffset()}const o=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,r=/^((\d{1,2}\/\d{1,2}\/\d{4})|(\d{4}-\d{1,2}-\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i;export{e as isDateString,n as parseDate};
