"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("moment-timezone")),r=function(t,r){return e.default.unix(t).format(r)},o=function(t){return t-t.clone().hour(0).minute(0).second(0).millisecond(0)};exports.convertDateStringToUnixTimestamp=function(t){var e=new Date(t).getTime();return Math.floor(e/1e3)},exports.formatLastDataUpdate=function(t){return r(t,"M/D/YYYY h:mm a")},exports.formatTimestamp=r,exports.getDayTimeDuration=function(t,r){var u=e.default.unix(t),n=e.default.unix(r),a=e.default.duration(6,"hours"),i=e.default.duration(12,"hours"),s=e.default.duration(18,"hours"),f=n-o(n),d=u-o(u),m=(e.default.duration(f-d).asDays()+1)*i;return u.hours()>17?m-=i:u.hours()>=6&&(m-=o(u)-a),n.hours()<=5?m-=i:n.hours()<18&&(m-=s-o(n)),Math.round(m/1e3)},exports.getDurationFromDayStart=o;
