this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Try use more system locale

Hopefully locale doesn't change half way

+5 -2
+2 -1
src/utils/nice-date-time.js
··· 1 + const { locale } = new Intl.DateTimeFormat().resolvedOptions(); 2 + 1 3 function niceDateTime(date, { hideTime, formatOpts } = {}) { 2 4 if (!(date instanceof Date)) { 3 5 date = new Date(date); 4 6 } 5 7 const currentYear = new Date().getFullYear(); 6 - const locale = new Intl.DateTimeFormat().resolvedOptions().locale; 7 8 const dateText = Intl.DateTimeFormat(locale, { 8 9 // Show year if not current year 9 10 year: date.getFullYear() === currentYear ? undefined : 'numeric',
+3 -1
src/utils/shorten-number.jsx
··· 1 + const { locale } = Intl.NumberFormat().resolvedOptions(); 2 + 1 3 export default function shortenNumber(num) { 2 - return Intl.NumberFormat('en-US', { 4 + return Intl.NumberFormat(locale, { 3 5 notation: 'compact', 4 6 }).format(num); 5 7 }