Methods
Static
GetHumanSize
- GetHumanSize(size: number): string
-
Returns string
Static
bytesToSize
- bytesToSize(bytes: number): string
-
Returns string
Static
formatAgo
- formatAgo(date: string | number | Date): string
-
Parameters
-
date: string | number | Date
Returns string
Static
formatBytes
- formatBytes(bytes: number, decimals?: number): string
-
Parameters
-
bytes: number
-
Optional
decimals: number
Returns string
Static
formatCurrency
- formatCurrency(value: number): string
-
Returns string
Static
formatDatabaseDateTime
- formatDatabaseDateTime(date: {
epochMillis: number;
}): string
-
Parameters
-
date: {
epochMillis: number;
}
Returns string
Static
formatDate
- formatDate(date: string | number | Date): string
-
Parameters
-
date: string | number | Date
Returns string
Static
formatDateTime
- formatDateTime(date: string | number | Date): string
-
Parameters
-
date: string | number | Date
Returns string
Static
formatDateTimeShortest
- formatDateTimeShortest(date: Date): string
-
Returns string
Static
formatDateTimeWithSeconds
- formatDateTimeWithSeconds(date: string | number | Date): string
-
Parameters
-
date: string | number | Date
Returns string
Static
formatDuration
- formatDuration(ms: number, showSeconds?: boolean, showMilliSeconds?: boolean): string
-
Parameters
-
ms: number
-
Optional
showSeconds: boolean
-
Optional
showMilliSeconds: boolean
Returns string
Static
formatMoney
- formatMoney(input: {
amount: number;
currency: string;
}): string
-
Parameters
-
input: {
amount: number;
currency: string;
}
-
amount: number
-
currency: string
Returns string
Static
formatSpan
- formatSpan(date1: string | number | Date, date2: string | number | Date): string
-
Parameters
-
date1: string | number | Date
-
date2: string | number | Date
Returns string
Static
formatTime
- formatTime(date: Date): string
-
Returns string
Static
formatTimeObject
- formatTimeObject(date: Date): string
-
Returns string
Static
formatTimeSpan
- formatTimeSpan(ms: number, showSeconds?: boolean): string
-
Parameters
-
ms: number
-
Optional
showSeconds: boolean
Returns string
Static
parseDate
- parseDate(date: string | number | Date): Date
-
Parameters
-
date: string | number | Date
Returns Date
Commonly used formatting methods. Explicitly not part of the public API