Remove unused locale helpers (#39959)

Co-authored-by: Kit Langton <kit.langton@gmail.com>
This commit is contained in:
opencode-agent[bot] 2026-07-31 20:31:06 -04:00 committed by GitHub
parent 4569659b03
commit eab59ea021
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,19 +16,6 @@ export function datetime(input: number): string {
return `${localTime} · ${localDate}`
}
export function todayTimeOrDateTime(input: number): string {
const date = new Date(input)
const now = new Date()
const isToday =
date.getFullYear() === now.getFullYear() && date.getMonth() === now.getMonth() && date.getDate() === now.getDate()
if (isToday) {
return time(input)
} else {
return datetime(input)
}
}
export function number(num: number): string {
if (num >= 1000000) {
return (num / 1000000).toFixed(1) + "M"
@ -108,9 +95,4 @@ export function truncateMiddle(str: string, maxLength: number = 35): string {
return str.slice(0, keepStart) + ellipsis + str.slice(-keepEnd)
}
export function pluralize(count: number, singular: string, plural: string): string {
const template = count === 1 ? singular : plural
return template.replace("{}", count.toString())
}
export * as Locale from "./locale"