@osovitny/anatoly 3.17.2 → 3.17.4

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.
@@ -7,3 +7,14 @@ export declare const ApiUrl: string;
7
7
  export declare const ClientApps: any;
8
8
  export declare const AppName: string;
9
9
  export declare const AppSettings: any;
10
+ export declare const dateFormats: {
11
+ medium: string;
12
+ short: string;
13
+ };
14
+ export declare const timeFormats: {
15
+ medium: string;
16
+ short: string;
17
+ };
18
+ export declare const dateTimeFormats: {
19
+ medium: string;
20
+ };
@@ -13,9 +13,4 @@ export declare class Convert {
13
13
  static company2String(comp: any): string;
14
14
  static address2String(adr: any): string;
15
15
  static stringToBoolean(value: any): boolean;
16
- static localToUtcDate(value: Date): Date | null;
17
- static localToUtcDateTime(value: Date): Date | null;
18
- static utcToLocalDate(value: Date): Date | null;
19
- static utcToLocalDateTime(value: Date): Date | null;
20
- static dateToString(date: any): string;
21
16
  }
@@ -0,0 +1,7 @@
1
+ export declare class DateConvert {
2
+ static toDate(argument: Date | number | string): Date;
3
+ static localToUtcDate(value: Date): Date | null;
4
+ static localToUtcDateTime(value: Date): Date | null;
5
+ static utcToLocalDate(value: Date): Date | null;
6
+ static utcToLocalDateTime(value: Date): Date | null;
7
+ }
@@ -1,5 +1,6 @@
1
1
  export * from './consts/settings';
2
2
  export * from './converts/convert';
3
+ export * from './converts/dateConvert';
3
4
  export * from './converts/xmlFormatter';
4
5
  export * from './go/base-go.service';
5
6
  export * from './guards/once-import.guard';
@@ -25,5 +26,6 @@ export * from './services/web-storage.service';
25
26
  export * from './browser';
26
27
  export * from './dom';
27
28
  export * from './guid';
29
+ export * from './is';
28
30
  export * from './subs';
29
31
  export * from './utils';
@@ -0,0 +1,23 @@
1
+ export declare class is {
2
+ /**
3
+ * @name isDate
4
+ * @summary Is the given value a date?
5
+ */
6
+ static date(value: any): boolean;
7
+ /**
8
+ * @name isDateValid
9
+ * @summary Is the given date valid?
10
+ */
11
+ static dateValid(date: any): boolean;
12
+ static dateInvalid(date: any): boolean;
13
+ static objectNullOrEmpty(obj: any): boolean;
14
+ static string(value: any): boolean;
15
+ static emptyString(value: any): boolean;
16
+ static notEmptyString(value: any): boolean;
17
+ static number(value: any): boolean;
18
+ static boolean(value: any): boolean;
19
+ static array(value: any): boolean;
20
+ static emptyArray(value: any): boolean;
21
+ static notEmptyArray(value: any): boolean;
22
+ static undefined(value: any): boolean;
23
+ }
@@ -18,14 +18,13 @@ export declare class LocalizationService implements OnDestroy {
18
18
  getBrowserLanguage(): string;
19
19
  getDatefnsLocale(): any;
20
20
  getLocalizedValue(key: string, params?: any[]): string;
21
- getLocalizedDate(key: string): string;
22
- getLocalizedDateTime(key: string): string;
23
- getLocalizedDistanceInWords(endedDate: string, startedDate: string): string;
24
- getLocalizedDistanceToNowInWords(date: string): string;
25
- getUTCToLocalizedDate(key: any): string;
26
- getUTCToLocalizedDateTime(key: string): string;
27
- getUTCToLocalizedDistanceToNowInWords(date: string): string;
28
- safeUtcToZonedTime(date: any): string;
21
+ getLocalizedDate(value: any): string;
22
+ getLocalizedDateTime(value: any): string;
23
+ getUTCToLocalizedDate(value: any): string;
24
+ getUTCToLocalizedDateTime(value: any): string;
25
+ private safeUtcToZonedTime;
26
+ getLocalizedDistanceInWords(endedDateStr: string, startedDateStr: string): string;
27
+ getLocalizedDistanceToNowInWords(value: string): string;
29
28
  static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationService, never>;
30
29
  static ɵprov: i0.ɵɵInjectableDeclaration<LocalizationService>;
31
30
  }
@@ -7,6 +7,4 @@ export declare class Utils {
7
7
  static downloadBlobFile(value: Blob, fileName: string): void;
8
8
  static slugify(text: string, prefix?: string, postfix?: string): string;
9
9
  static generateRandom(start: number, end: number): number;
10
- static isObjectNullOrEmpty(obj: any): boolean;
11
- static isString(value: any): boolean;
12
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osovitny/anatoly",
3
- "version": "3.17.2",
3
+ "version": "3.17.4",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "17.1.2",
6
6
  "@angular/core": "17.1.2",
@@ -48,7 +48,7 @@
48
48
  "@ngx-translate/core": "15.0.0",
49
49
  "@ngx-translate/http-loader": "8.0.0",
50
50
  "core-js": "3.35.1",
51
- "date-fns": "2.30.0",
51
+ "date-fns": "3.3.1",
52
52
  "date-fns-tz": "2.0.0",
53
53
  "js-beautify": "1.14.11",
54
54
  "ngx-captcha": "13.0.0",