// Module ID: 4860 // Function ID: 4861 // Name: TIMESTAMP_FORMATS // Dependencies: [4067, 3979, 687, 2] // Exports: formatTimestampMention, parseTimestamp, unparseTimestamp // Module 4860 (TIMESTAMP_FORMATS) import set from "set" /* 2 */; import setDefault from "set" /* 687 */; import hooksDefault from "hooks" /* 3979 */; import resetCache from "resetCache" /* 4067 */; let obj = { t(date) { return resetCache.dateFormat(date, "LT"); }, T(date) { return resetCache.dateFormat(date, "LTS"); }, d(date) { return resetCache.dateFormat(date, "L"); }, D(date) { return resetCache.dateFormat(date, "LL"); }, f(date) { return resetCache.dateFormat(date, "LLL"); }, F(date) { return resetCache.dateFormat(date, "LLLL"); }, s(date) { return resetCache.dateFormat(date, "L LT"); }, S(date) { return resetCache.dateFormat(date, "L LTS"); }, R(toDate) { const result = hooksDefault.relativeTimeThreshold("s"); obj = hooksDefault; const result1 = hooksDefault.relativeTimeThreshold("s", 60); const obj2 = hooksDefault; const result2 = hooksDefault.relativeTimeThreshold("ss"); const obj3 = hooksDefault; const result3 = hooksDefault.relativeTimeThreshold("ss", -1); const obj4 = hooksDefault; const result4 = hooksDefault.relativeTimeThreshold("m"); const obj5 = hooksDefault; const result5 = hooksDefault.relativeTimeThreshold("m", 60); try { let tmpResult = tmp(3979); let fromNowResult = tmpResult(toDate.toDate()).fromNow(); tmpResult = tmp(3979); const result6 = tmpResult.relativeTimeThreshold("s", result); const tmpResultResult = tmpResult(toDate.toDate()); const result7 = tmp(3979).relativeTimeThreshold("ss", result2); const tmpResult1 = tmp(3979); const result8 = tmp(3979).relativeTimeThreshold("m", result4); if (fromNowResult == null) { const tmpResult3 = tmp(3979); fromNowResult = tmp(3979)(toDate.toDate()).fromNow(); const tmpResult4Result = tmp(3979)(toDate.toDate()); } return fromNowResult; } catch (err) { } } }; Object.setPrototypeOf(obj, null); const keys = Object.keys(obj); const regExp = new RegExp("^"); let result = set.fileFinishedImporting("modules/markup/TimestampUtils.tsx"); export const TIMESTAMP_FORMATS = obj; export const DEFAULT_TIMESTAMP_FORMAT = "f"; export const TIMESTAMP_REGEX = regExp; export const formatTimestampMention = function formatTimestampMention(arg0) { ({ timestamp, format } = arg0); const tmp = hooksDefault; const tmpResult = tmp(Number(timestamp) * setDefault.Millis.SECOND); if (tmpResult.isValid()) { let f; if (null != format) { f = obj[format]; } if (null == f) { f = obj.f; } obj = { timestamp: null, format: null, parsed: null, full: null, formatted: null }; obj[0] = timestamp; obj[1] = format; obj[2] = tmpResult; obj[3] = obj.F(tmpResult); obj[4] = f(tmpResult); return obj; } else { return null; } const NumberResult = Number(timestamp); }; export const parseTimestamp = function parseTimestamp(arg0, arg1) { const tmp = hooksDefault; const tmpResult = tmp(Number(arg0) * setDefault.Millis.SECOND); let tmp3 = null; if (tmpResult.isValid()) { let f; if (null != arg1) { f = obj[arg1]; } if (null == f) { f = obj.f; } obj = { timestamp: null, format: null, parsed: null, full: null, formatted: null }; obj[0] = arg0; obj[1] = arg1; obj[2] = tmpResult; obj[3] = obj.F(tmpResult); obj[4] = f(tmpResult); tmp3 = obj; } return tmp3; }; export const unparseTimestamp = function unparseTimestamp(arg0, arg1) { if (null != arg1) { const _HermesInternal2 = HermesInternal; let combined = ""; } else { const _HermesInternal = HermesInternal; combined = ""; } return combined; };