Add test utilities and ast-grep rules for code quality. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -95,11 +95,11 @@ export function formatRelativeDate(
|
||||
return "Yesterday";
|
||||
}
|
||||
if (diffDays < 7) {
|
||||
return `${String(diffDays)} days ago`;
|
||||
return `${diffDays.toLocaleString()} days ago`;
|
||||
}
|
||||
if (diffDays < 30) {
|
||||
const weeks = Math.floor(diffDays / 7);
|
||||
return weeks === 1 ? "1 week ago" : `${String(weeks)} weeks ago`;
|
||||
return weeks === 1 ? "1 week ago" : `${weeks.toLocaleString()} weeks ago`;
|
||||
}
|
||||
|
||||
// For older dates, show the actual date
|
||||
|
||||
Reference in New Issue
Block a user