(offset: number)
| 44 | |
| 45 | // Bare offsets everywhere: "UTC+1", "UTC+5:30", "UTC-3". |
| 46 | export const formatUtcOffset = (offset: number): string => { |
| 47 | const hours = Math.trunc(Math.abs(offset)); |
| 48 | const minutes = Math.round((Math.abs(offset) - hours) * 60); |
| 49 | |
| 50 | return `UTC${offset < 0 ? '-' : '+'}${hours}${ |
| 51 | minutes ? `:${String(minutes).padStart(2, '0')}` : '' |
| 52 | }`; |
| 53 | }; |
| 54 | |
| 55 | export const formatLfgReputation = (value: number): string => |
| 56 | `${value.toLocaleString('en-US')}+ reputation`; |
no outgoing calls
no test coverage detected