{ "version": 3, "sources": ["../../../src/ts/entry/time.ts"], "sourcesContent": ["import dayjs from \"dayjs\";\n\nexport const locales = ((): string[] => {\n const languages = [];\n\n for (const lang of navigator.languages) {\n if (lang.startsWith(\"en\")) {\n languages.push(lang);\n }\n }\n\n if (languages.length === 0) {\n languages.push(\"en-US\");\n }\n\n return languages;\n})();\n\nformatTime();\nformatTimePretty();\nformatFutureTimePretty();\nformatDate();\nformatDateSimple();\nformatRelativeTimeAll();\n\nfunction diffs(dt: Date): [number, number, number] {\n const diffDays = new Date().getDate() - dt.getDate();\n const diffMonths = new Date().getMonth() - dt.getMonth();\n const diffYears = new Date().getFullYear() - dt.getFullYear();\n\n return [diffYears, diffMonths, diffDays];\n}\n\nfunction isToday(datetime: Date): boolean {\n const [diffYears, diffMonths, diffDays] = diffs(datetime);\n\n if (diffYears === 0 && diffMonths === 0 && diffDays === 0) {\n return true;\n }\n\n return false;\n}\n\nfunction isYesterday(datetime: Date): boolean {\n const [diffYears, diffMonths, diffDays] = diffs(datetime);\n\n if (diffYears === 0 && diffMonths === 0 && diffDays === 1) {\n return true;\n }\n\n return false;\n}\n\nfunction isTomorrow(datetime: Date): boolean {\n const [diffYears, diffMonths, diffDays] = diffs(datetime);\n\n if (diffYears === 0 && diffMonths === 0 && diffDays === -1) {\n return true;\n }\n\n return false;\n}\n\nfunction formatRelativeTime(date: Date): string {\n const formatter = new Intl.RelativeTimeFormat(locales, {\n numeric: \"auto\",\n });\n const numDays = dayjs(date).diff(new Date(), \"day\");\n\n if (numDays >= 2) {\n return formatter.format(numDays, \"day\");\n }\n\n const numHours = dayjs(date).diff(new Date(), \"hour\");\n if (numHours >= 2) {\n return formatter.format(numHours, \"hour\");\n }\n\n const numMinutes = dayjs(date).diff(new Date(), \"minute\");\n if (numMinutes >= 2) {\n return formatter.format(numMinutes, \"minute\");\n }\n\n return `<${formatter.format(2, \"minute\")}`;\n}\n\nexport function timestampToLocalTime(dateString: string | Date): string {\n const datetime = new Date(dateString);\n const currentDatetime = new Date();\n\n if (isToday(datetime)) {\n const timeFormatter = new Intl.DateTimeFormat(locales, {\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n });\n return timeFormatter.format(datetime);\n }\n\n const thisYearDateFormatter = new Intl.DateTimeFormat(locales, {\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n });\n if (datetime.getFullYear() === currentDatetime.getFullYear()) {\n return thisYearDateFormatter.format(datetime);\n }\n\n const dateFormatter = new Intl.DateTimeFormat(locales, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n });\n\n return dateFormatter.format(datetime);\n}\n\nfunction timestampToLocalTimePretty(dateString: string): string {\n const datetime = new Date(dateString);\n const currentDatetime = new Date();\n\n if (isYesterday(datetime) || isTomorrow(datetime)) {\n const timeFormatter = new Intl.DateTimeFormat(locales, {\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n });\n return timeFormatter.format(datetime);\n }\n\n if (isToday(datetime)) {\n const timeFormatter = new Intl.DateTimeFormat(locales, {\n hour: \"numeric\",\n minute: \"numeric\",\n });\n return timeFormatter.format(datetime);\n }\n\n if (datetime.getFullYear() === currentDatetime.getFullYear()) {\n const formatter = new Intl.DateTimeFormat(locales, {\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n });\n return formatter.format(datetime);\n }\n\n const formatter = new Intl.DateTimeFormat(locales, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n });\n return formatter.format(datetime);\n}\n\nexport function formatTime(): void {\n const els = document.querySelectorAll(\"[data-format-time]\");\n els.forEach((el) => {\n const dateString = el.innerHTML;\n const localTime = timestampToLocalTime(dateString);\n el.innerHTML = localTime;\n el.removeAttribute(\"data-format-time\");\n });\n}\n\nexport function formatFutureTimePretty(): void {\n const els = document.querySelectorAll(\"[data-format-time-future-pretty]\");\n els.forEach((el) => {\n const myEl = el as HTMLElement;\n const dateString = myEl.dataset.formatTimeFuturePretty!;\n\n const date = new Date(dateString);\n if (date < new Date()) {\n el.remove();\n return;\n }\n\n const localTimeStr = timestampToLocalTimePretty(dateString);\n\n const text = myEl.dataset.formatTimeFuturePrettyText;\n\n if (text) {\n el.innerHTML = `${text} ${localTimeStr}`;\n } else {\n // Make first letter uppercase.\n el.innerHTML =\n localTimeStr.charAt(0).toUpperCase() + localTimeStr.slice(1);\n }\n\n el.removeAttribute(\"data-format-time-future-pretty\");\n el.removeAttribute(\"data-format-time-future-pretty-text\");\n });\n}\n\nexport function formatTimePretty(): void {\n const els = document.querySelectorAll(\"[data-format-time-pretty]\");\n els.forEach((el) => {\n const myEl = el as HTMLElement;\n const dateString = myEl.dataset.formatTimePretty!;\n\n const localTimeStr = timestampToLocalTimePretty(dateString);\n\n const text = myEl.dataset.formatTimeFuturePrettyText;\n\n if (text) {\n el.innerHTML = `${text} ${localTimeStr}`;\n } else {\n // Make first letter uppercase.\n el.innerHTML =\n localTimeStr.charAt(0).toUpperCase() + localTimeStr.slice(1);\n }\n\n el.removeAttribute(\"data-format-time-pretty\");\n el.removeAttribute(\"data-format-time-pretty-text\");\n });\n}\n\nexport function timestampToLocalDate(dateString: string | Date): string {\n const datetime = new Date(dateString);\n const currentDatetime = new Date();\n\n if (datetime.getFullYear() === currentDatetime.getFullYear()) {\n const dateFormatter = new Intl.DateTimeFormat(locales, {\n month: \"short\",\n day: \"numeric\",\n });\n return dateFormatter.format(datetime);\n }\n\n const dateFormatter = new Intl.DateTimeFormat(locales, {\n month: \"short\",\n day: \"numeric\",\n year: \"numeric\",\n });\n return dateFormatter.format(datetime);\n}\n\nexport function formatDate(): void {\n const els = document.querySelectorAll(\"[data-format-date]\");\n els.forEach((el) => {\n const dateString = el.innerHTML;\n const localDate = timestampToLocalDate(dateString);\n el.innerHTML = localDate;\n el.removeAttribute(\"data-format-date\");\n });\n}\n\nfunction timestampToLocalDateSimple(dateString: string): string {\n const datetime = new Date(dateString);\n const str = dateToLocalDateSimple(datetime);\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\nexport function dateToLocalDateSimple(date: Date): string {\n date = new Date(date);\n\n const currentDatetime = new Date();\n\n if (isToday(date) || isYesterday(date) || isTomorrow(date)) {\n const relativeFormatter = new Intl.RelativeTimeFormat(locales, {\n numeric: \"auto\",\n });\n const today = dayjs(currentDatetime).startOf(\"day\").valueOf();\n const day = dayjs(date).startOf(\"day\").valueOf();\n const days = dayjs(day).diff(today, \"day\");\n return relativeFormatter.format(days, \"day\");\n }\n\n if (date.getFullYear() === currentDatetime.getFullYear()) {\n const formatter = new Intl.DateTimeFormat(locales, {\n month: \"short\",\n day: \"numeric\",\n });\n return formatter.format(date);\n }\n\n const formatter = new Intl.DateTimeFormat(locales, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n return formatter.format(date);\n}\n\n// Start with uppercase of `dateToWhenSimpleBase`.\nexport function dateToWhenSimple(date: Date): string {\n const dateStr = dateToWhenSimpleBase(date);\n return dateStr.charAt(0).toUpperCase() + dateStr.slice(1);\n}\n\nexport function dateToWhenSimpleBase(date: Date): string {\n const timeFormatter = new Intl.RelativeTimeFormat(locales, {\n numeric: \"auto\",\n });\n date = new Date(date);\n\n const currentDatetime = new Date();\n\n // If in the last 60 minutes, do \"X minutes ago\"\n if (currentDatetime.getTime() - date.getTime() < 60 * 60 * 1000) {\n const minutes = Math.floor(\n (currentDatetime.getTime() - date.getTime()) / 60 / 1000,\n );\n if (minutes === 0) {\n return \"just now\";\n }\n\n return timeFormatter.format(-minutes, \"minute\");\n }\n\n const hours = Math.floor(\n (currentDatetime.getTime() - date.getTime()) / 60 / 60 / 1000,\n );\n\n // If in the last 6 hours, do \"X hours ago\"\n if (currentDatetime.getTime() - date.getTime() < 6 * 60 * 60 * 1000) {\n return timeFormatter.format(-hours, \"hour\");\n }\n\n // If in the last 24 hours, check if it's today or yesterday.\n if (currentDatetime.getTime() - date.getTime() < 24 * 60 * 60 * 1000) {\n if (isToday(date)) {\n return timeFormatter.format(-hours, \"hour\");\n }\n if (isYesterday(date)) {\n return timeFormatter.format(-1, \"day\");\n }\n }\n\n // If in the last 7 days, do \"X days ago\" using dayjs.\n if (currentDatetime.getTime() - date.getTime() < 7 * 24 * 60 * 60 * 1000) {\n const currentDay = dayjs(currentDatetime).startOf(\"day\").valueOf();\n const day = dayjs(date).startOf(\"day\").valueOf();\n const days = dayjs(currentDay).diff(day, \"day\");\n return timeFormatter.format(-days, \"day\");\n }\n\n\n // Else, do date.\n\n // Exclude year if it's the same as the current year.\n if (date.getFullYear() === currentDatetime.getFullYear()) {\n const dateFormatter = new Intl.DateTimeFormat(locales, {\n month: \"short\",\n day: \"numeric\",\n });\n return dateFormatter.format(date);\n }\n\n const dateFormatter = new Intl.DateTimeFormat(locales, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n return dateFormatter.format(date);\n}\n\nfunction formatDateSimple(): void {\n const els = document.querySelectorAll(\"[data-format-date-simple]\");\n els.forEach((el) => {\n const dateString = el.innerHTML;\n const localDate = timestampToLocalDateSimple(dateString);\n el.innerHTML = localDate;\n el.removeAttribute(\"data-format-date-simple\");\n });\n}\n\nfunction formatRelativeTimeAll(): void {\n const els = document.querySelectorAll(\"[data-format-relative-time]\");\n els.forEach((el) => {\n const dateString = (el as HTMLElement).dataset.formatRelativeTime!;\n const date = new Date(dateString);\n const timeStr = formatRelativeTime(date);\n el.innerHTML = timeStr;\n el.removeAttribute(\"data-format-relative-time\");\n });\n}\n"], "mappings": "gFAAA,IAAAA,EAAkB,OAELC,GAAW,IAAgB,CACtC,IAAMC,EAAY,CAAC,EAEnB,QAAWC,KAAQ,UAAU,UACvBA,EAAK,WAAW,IAAI,GACtBD,EAAU,KAAKC,CAAI,EAIvB,OAAID,EAAU,SAAW,GACvBA,EAAU,KAAK,OAAO,EAGjBA,CACT,GAAG,EAEHE,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,EAAE,KAAKR,EAAK,KAAK,EAC9C,OAAOK,EAAc,OAAO,CAACJ,EAAM,KAAK,CAC1C,CAMA,OAAIxB,EAAK,YAAY,IAAMQ,EAAgB,YAAY,EAC/B,IAAI,KAAK,eAAe3B,EAAS,CACrD,MAAO,QACP,IAAK,SACP,CAAC,EACoB,OAAOmB,CAAI,EAGZ,IAAI,KAAK,eAAenB,EAAS,CACrD,KAAM,UACN,MAAO,QACP,IAAK,SACP,CAAC,EACoB,OAAOmB,CAAI,CAClC,CAEA,SAASZ,GAAyB,CACpB,SAAS,iBAAiB,2BAA2B,EAC7D,QAASuB,GAAO,CAClB,IAAMJ,EAAaI,EAAG,UAChBM,EAAYC,EAA2BX,CAAU,EACvDI,EAAG,UAAYM,EACfN,EAAG,gBAAgB,yBAAyB,CAC9C,CAAC,CACH,CAEA,SAAStB,GAA8B,CACzB,SAAS,iBAAiB,6BAA6B,EAC/D,QAASsB,GAAO,CAClB,IAAMJ,EAAcI,EAAmB,QAAQ,mBACzCX,EAAO,IAAI,KAAKO,CAAU,EAC1ByB,EAAUjC,EAAmBC,CAAI,EACvCW,EAAG,UAAYqB,EACfrB,EAAG,gBAAgB,2BAA2B,CAChD,CAAC,CACH", "names": ["import_dayjs", "locales", "languages", "lang", "formatTime", "formatTimePretty", "formatFutureTimePretty", "formatDate", "formatDateSimple", "formatRelativeTimeAll", "diffs", "dt", "diffDays", "diffMonths", "isToday", "datetime", "diffYears", "isYesterday", "isTomorrow", "formatRelativeTime", "date", "formatter", "numDays", "dayjs", "numHours", "numMinutes", "timestampToLocalTime", "dateString", "currentDatetime", "thisYearDateFormatter", "timestampToLocalTimePretty", "el", "localTime", "myEl", "localTimeStr", "text", "timestampToLocalDate", "localDate", "timestampToLocalDateSimple", "str", "dateToLocalDateSimple", "relativeFormatter", "today", "day", "days", "dateToWhenSimple", "dateStr", "dateToWhenSimpleBase", "timeFormatter", "minutes", "hours", "currentDay", "timeStr"] }