[🐴] Reduce amount that message sent date is shown (#4228)

This commit is contained in:
Samuel Newman
2024-10-03 18:19:38 +03:00
committed by GitHub
parent 523a9a48c2
commit 7e79c7f768
6 changed files with 209 additions and 94 deletions
+9
View File
@@ -16,3 +16,12 @@ export function canBeMessaged(profile: AppBskyActorDefs.ProfileView) {
return false
}
}
export function localDateString(date: Date) {
// can't use toISOString because it should be in local time
const mm = date.getMonth()
const dd = date.getDate()
const yyyy = date.getFullYear()
// not padding with 0s because it's not necessary, it's just used for comparison
return `${yyyy}-${mm}-${dd}`
}