const t=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d[:]?\d\d)|Z)?)?)?)?$/i,n=/^\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d[:]?\d\d)|Z)?$/i,r="HH:mm:ss.SSS",e="YYYY-MM-DD",d="T",i="YYYY-MM-DD HH:mm:ss",s=/(Z|([+-])(\d{2})[:]?(\d{2}))$/i;function u(n){return function(n){if("string"!=typeof n)return!1;return t.test(n)}(n)&&g(n)}function f(t){if(!function(t){if("string"!=typeof t)return!1;return n.test(t)}(t))return!1;return g(`2018-09-09T${o(t)}Z`)}function o(t){return"string"==typeof t?t.split(s)[0]:t}function c(t){if("string"==typeof t&&(g(t)||f(t))){const n=t.indexOf(".");let r=t.search(s);if(-1===r&&(r=t.length),-1!==n){const e=t.substring(n+1,r);let d=e;if(e.length>3)d=d.substring(0,3);else if(e.length<3){d=`${d}${"0".repeat(3-e.length)}`}return`${t.substring(0,n)}.${d}${t.substring(r)}`}}return t}function g(t){const n=Date.parse(t);return isFinite(n)}export{i as STANDARD_DATETIME_FORMAT,e as STANDARD_DATE_FORMAT,r as STANDARD_TIME_FORMAT,d as TIME_SEPARATOR,u as isValidISODateTimeString,f as isValidISOTimeString,c as padMilliseconds,o as removeTimeZoneSuffix};
