@harbortouch/skytab-analytics-report-utils 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,34 @@
1
+ export type TimeFormat = '00:00' | '00:00:00' | '00:00-24H';
2
+ export interface LocaleOptions {
3
+ currency: string;
4
+ locale: string;
5
+ }
6
+ export interface FormatDateOptions {
7
+ locale?: string;
8
+ timeZone?: string;
9
+ format?: TimeFormat;
10
+ }
11
+ export interface FormatTimeOptions {
12
+ locale?: string;
13
+ timeZone?: string;
14
+ format: TimeFormat;
15
+ }
16
+ export interface FormatMoneyOptions {
17
+ locale?: string;
18
+ currency?: string;
19
+ decimals?: number;
20
+ }
21
+ export declare const formatDate: (date: Date, options?: FormatDateOptions) => string;
22
+ export declare const formatTime: (date: Date | string | number, options: FormatTimeOptions) => string;
23
+ export declare const formatMoney: (amount: number, options?: FormatMoneyOptions) => string;
24
+ export declare const formatPercent: (value: number, decimals?: number) => string;
25
+ export declare const formatInteger: (value: number) => string;
26
+ export declare const formatFixedNumber: (value: number, decimals?: number) => string;
27
+ export declare const formatString: (value: unknown) => string;
28
+ export declare const getNumberToFormat: (value: unknown) => number;
29
+ export declare const getDateToFormat: (value?: unknown) => Date | null;
30
+ export declare const getReportFormattingLocaleOptions: (locations: {
31
+ currency: string;
32
+ countryCode: string;
33
+ language: string;
34
+ }[]) => LocaleOptions[];
@@ -0,0 +1 @@
1
+ export {};