@umituz/react-native-subscription 2.14.91 → 2.14.92

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-subscription",
3
- "version": "2.14.91",
3
+ "version": "2.14.92",
4
4
  "description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -24,23 +24,18 @@ export const convertPurchasedAt = (purchasedAt: unknown): string | null => {
24
24
  };
25
25
 
26
26
  /**
27
- * Formats a date string for display
27
+ * Formats a date string to a simple DD.MM.YYYY format
28
28
  */
29
- export const formatDateForLocale = (
30
- dateStr: string | null,
31
- locale: string
32
- ): string | null => {
29
+ export const formatDate = (dateStr: string | null): string | null => {
33
30
  if (!dateStr) return null;
34
-
35
- try {
36
- return timezoneService.formatDate(new Date(dateStr), locale, {
37
- year: "numeric",
38
- month: "long",
39
- day: "numeric",
40
- });
41
- } catch {
42
- return null;
43
- }
31
+ const date = new Date(dateStr);
32
+ if (isNaN(date.getTime())) return null;
33
+
34
+ const d = String(date.getDate()).padStart(2, '0');
35
+ const m = String(date.getMonth() + 1).padStart(2, '0');
36
+ const y = date.getFullYear();
37
+
38
+ return `${d}.${m}.${y}`;
44
39
  };
45
40
 
46
41