You've already forked AstralRinth
forked from didirus/AstralRinth
feat(frontend): Improve revenue information (#3250)
* Improve revenue information * Improve NET 60 period info + show next period if current period is over. * invert period check * % * Finalize changes * Cleanup * Remove .idea * Discard changes to .idea/discord.xml * Discard changes to .idea/code.iml * Discard changes to .idea/.gitignore * Discard changes to .idea/libraries/KotlinJavaRuntime.xml * Discard changes to .idea/vcs.xml * Discard changes to .idea/modules.xml * Discard changes to .idea/.gitignore * fix lint issues * table fix, lint fix and media sizing fix * fix responsiveness * Remove comment * utc comment * fix lint
This commit is contained in:
@@ -87,6 +87,17 @@ export const formatNumber = (number, abbreviate = true) => {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
||||
}
|
||||
|
||||
export function formatDate(
|
||||
date: dayjs.Dayjs,
|
||||
options: Intl.DateTimeFormatOptions = {
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
year: 'numeric',
|
||||
},
|
||||
): string {
|
||||
return date.toDate().toLocaleDateString(undefined, options)
|
||||
}
|
||||
|
||||
export function formatMoney(number, abbreviate = false) {
|
||||
const x = Number(number)
|
||||
if (x >= 1000000 && abbreviate) {
|
||||
|
||||
Reference in New Issue
Block a user