@greatdayhr/capacitor-datetime-setting 1.1.2 → 2.0.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.
@@ -1,45 +1,211 @@
1
+ /**
2
+ * Result from comprehensive date/time change detection
3
+ */
4
+ export interface DateTimeChangeResult {
5
+ /**
6
+ * Type of change detected
7
+ */
8
+ changeType: 'noChange' | 'timeOnly' | 'dateOnly' | 'dateAndTime';
9
+ /**
10
+ * Time difference in seconds
11
+ */
12
+ timeDifference: number;
13
+ /**
14
+ * Whether the date component changed
15
+ */
16
+ dateChanged: boolean;
17
+ /**
18
+ * Whether the time component changed
19
+ */
20
+ timeChanged: boolean;
21
+ /**
22
+ * Whether automatic date/time is enabled
23
+ */
24
+ isAutoDateTimeEnabled: boolean;
25
+ /**
26
+ * Previous date timestamp (Unix epoch, may be null on first check)
27
+ */
28
+ previousDate?: number;
29
+ /**
30
+ * Current date timestamp (Unix epoch)
31
+ */
32
+ currentDate: number;
33
+ }
1
34
  export interface DateTimeSettingPlugin {
2
35
  /**
3
- * Check if automatic time is enabled on the device.
36
+ * Detects if the device's date/time has been manually changed.
37
+ * Uses network time comparison for accuracy when available.
38
+ *
39
+ * @returns Promise with boolean indicating if change was detected
40
+ * @since 2.0.0
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * const result = await DateTimeSetting.detectDateTimeChange();
45
+ * if (result.changed) {
46
+ * console.log('Date/time has been changed!');
47
+ * }
48
+ * ```
49
+ */
50
+ detectDateTimeChange(): Promise<{
51
+ changed: boolean;
52
+ }>;
53
+ /**
54
+ * Comprehensive date and time change detection with detailed analysis.
55
+ * Distinguishes between date-only, time-only, and combined changes.
56
+ *
57
+ * @returns Promise with detailed change result
58
+ * @since 2.0.0
59
+ *
60
+ * @example
61
+ * ```typescript
62
+ * const result = await DateTimeSetting.detectComprehensiveDateTimeChange();
63
+ * console.log('Change type:', result.changeType);
64
+ * console.log('Date changed:', result.dateChanged);
65
+ * console.log('Time changed:', result.timeChanged);
66
+ * ```
67
+ */
68
+ detectComprehensiveDateTimeChange(): Promise<DateTimeChangeResult>;
69
+ /**
70
+ * Detects specifically if only the date has been changed while time remains similar.
71
+ * Useful for detecting manual date changes when auto date/time is disabled.
72
+ *
73
+ * @returns Promise with boolean indicating if date-only change was detected
74
+ * @since 2.0.0
75
+ *
76
+ * @example
77
+ * ```typescript
78
+ * const result = await DateTimeSetting.detectDateOnlyChange();
79
+ * if (result.changed) {
80
+ * console.log('Only the date was changed!');
81
+ * }
82
+ * ```
83
+ */
84
+ detectDateOnlyChange(): Promise<{
85
+ changed: boolean;
86
+ }>;
87
+ /**
88
+ * Comprehensive date and time change detection with automatic notifications.
89
+ * Shows user notifications when changes are detected.
90
+ *
91
+ * @returns Promise with detailed change result
92
+ * @since 2.0.0
93
+ *
94
+ * @example
95
+ * ```typescript
96
+ * const result = await DateTimeSetting.detectAndNotifyDateTimeChanges();
97
+ * // User will see notification if changes detected
98
+ * console.log('Change type:', result.changeType);
99
+ * ```
100
+ */
101
+ detectAndNotifyDateTimeChanges(): Promise<DateTimeChangeResult>;
102
+ /**
103
+ * Get the device's current local time.
104
+ *
105
+ * @returns Promise with Unix timestamp
106
+ * @since 2.0.0
107
+ *
108
+ * @example
109
+ * ```typescript
110
+ * const result = await DateTimeSetting.getLocalTime();
111
+ * const date = new Date(result.timestamp * 1000);
112
+ * console.log('Current local time:', date);
113
+ * ```
114
+ */
115
+ getLocalTime(): Promise<{
116
+ timestamp: number;
117
+ }>;
118
+ /**
119
+ * Fetch accurate UTC time from internet time server.
4
120
  *
5
- * @returns Promise with boolean value indicating if auto time is enabled
6
- * @since 1.0.0
121
+ * @returns Promise with Unix timestamp from internet
122
+ * @since 2.0.0
7
123
  *
8
124
  * @example
9
125
  * ```typescript
10
- * const result = await DateTimeSetting.timeIsAuto();
11
- * console.log('Auto time enabled:', result.value);
126
+ * try {
127
+ * const result = await DateTimeSetting.getInternetUTCTime();
128
+ * const date = new Date(result.timestamp * 1000);
129
+ * console.log('Internet UTC time:', date);
130
+ * } catch (error) {
131
+ * console.error('Failed to fetch internet time:', error);
132
+ * }
12
133
  * ```
13
134
  */
14
- timeIsAuto(): Promise<{
15
- value: boolean;
135
+ getInternetUTCTime(): Promise<{
136
+ timestamp: number;
16
137
  }>;
17
138
  /**
18
- * Check if automatic timezone is enabled on the device.
139
+ * Convert local time to UTC.
140
+ *
141
+ * @param options - Object containing the timestamp to convert
142
+ * @returns Promise with UTC timestamp
143
+ * @since 2.0.0
144
+ *
145
+ * @example
146
+ * ```typescript
147
+ * const localTimestamp = Date.now() / 1000;
148
+ * const result = await DateTimeSetting.convertToLocalTime({
149
+ * timestamp: localTimestamp
150
+ * });
151
+ * console.log('UTC timestamp:', result.timestamp);
152
+ * ```
153
+ */
154
+ convertToLocalTime(options: {
155
+ timestamp: number;
156
+ }): Promise<{
157
+ timestamp: number;
158
+ }>;
159
+ /**
160
+ * Set the stored timestamp for future change detection.
161
+ *
162
+ * @param options - Object containing the timestamp to store
163
+ * @returns Promise that resolves when timestamp is stored
164
+ * @since 2.0.0
165
+ *
166
+ * @example
167
+ * ```typescript
168
+ * const currentTimestamp = Date.now() / 1000;
169
+ * await DateTimeSetting.setStoredTimestamp({
170
+ * timestamp: currentTimestamp
171
+ * });
172
+ * ```
173
+ */
174
+ setStoredTimestamp(options: {
175
+ timestamp: number;
176
+ }): Promise<void>;
177
+ /**
178
+ * Get the currently stored timestamp.
19
179
  *
20
- * @returns Promise with boolean value indicating if auto timezone is enabled
21
- * @since 1.0.0
180
+ * @returns Promise with stored timestamp (null if not set)
181
+ * @since 2.0.0
22
182
  *
23
183
  * @example
24
184
  * ```typescript
25
- * const result = await DateTimeSetting.timeZoneIsAuto();
26
- * console.log('Auto timezone enabled:', result.value);
185
+ * const result = await DateTimeSetting.getStoredTimestamp();
186
+ * if (result.timestamp) {
187
+ * const date = new Date(result.timestamp * 1000);
188
+ * console.log('Stored timestamp:', date);
189
+ * } else {
190
+ * console.log('No timestamp stored');
191
+ * }
27
192
  * ```
28
193
  */
29
- timeZoneIsAuto(): Promise<{
30
- value: boolean;
194
+ getStoredTimestamp(): Promise<{
195
+ timestamp: number | null;
31
196
  }>;
32
197
  /**
33
- * Open the device's date and time settings screen.
198
+ * Reset the detector (clears all stored data and cache).
34
199
  *
35
- * @returns Promise that resolves when settings are opened
36
- * @since 1.0.0
200
+ * @returns Promise that resolves when reset is complete
201
+ * @since 2.0.0
37
202
  *
38
203
  * @example
39
204
  * ```typescript
40
- * await DateTimeSetting.openSetting();
205
+ * await DateTimeSetting.resetDetector();
206
+ * console.log('Detector has been reset');
41
207
  * ```
42
208
  */
43
- openSetting(): Promise<void>;
209
+ resetDetector(): Promise<void>;
44
210
  }
45
211
  //# sourceMappingURL=definitions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IAClC;;;;;;;;;;;OAWG;IACH,UAAU,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAE1C;;;;;;;;;;;OAWG;IACH,cAAc,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAE9C;;;;;;;;;;OAUG;IACH,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC"}
1
+ {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,UAAU,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,aAAa,CAAC;IAEjE;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,qBAAqB,EAAE,OA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web.d.ts CHANGED
@@ -1,12 +1,31 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
- import type { DateTimeSettingPlugin } from './definitions';
2
+ import type { DateTimeSettingPlugin, DateTimeChangeResult } from './definitions';
3
3
  export declare class DateTimeSettingWeb extends WebPlugin implements DateTimeSettingPlugin {
4
- timeIsAuto(): Promise<{
5
- value: boolean;
4
+ detectDateTimeChange(): Promise<{
5
+ changed: boolean;
6
6
  }>;
7
- timeZoneIsAuto(): Promise<{
8
- value: boolean;
7
+ detectComprehensiveDateTimeChange(): Promise<DateTimeChangeResult>;
8
+ detectDateOnlyChange(): Promise<{
9
+ changed: boolean;
9
10
  }>;
10
- openSetting(): Promise<void>;
11
+ detectAndNotifyDateTimeChanges(): Promise<DateTimeChangeResult>;
12
+ getLocalTime(): Promise<{
13
+ timestamp: number;
14
+ }>;
15
+ getInternetUTCTime(): Promise<{
16
+ timestamp: number;
17
+ }>;
18
+ convertToLocalTime(options: {
19
+ timestamp: number;
20
+ }): Promise<{
21
+ timestamp: number;
22
+ }>;
23
+ setStoredTimestamp(options: {
24
+ timestamp: number;
25
+ }): Promise<void>;
26
+ getStoredTimestamp(): Promise<{
27
+ timestamp: number | null;
28
+ }>;
29
+ resetDetector(): Promise<void>;
11
30
  }
12
31
  //# sourceMappingURL=web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3D,qBAAa,kBAAmB,SAAQ,SAAU,YAAW,qBAAqB;IACxE,UAAU,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;IAIzC,cAAc,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;IAI7C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrC"}
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEjF,qBAAa,kBAAmB,SAAQ,SAAU,YAAW,qBAAqB;IAExE,oBAAoB,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAIrD,iCAAiC,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAIlE,oBAAoB,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAIrD,8BAA8B,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAK/D,YAAY,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAI9C,kBAAkB,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAIpD,kBAAkB,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAKlF,kBAAkB,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjE,kBAAkB,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAI3D,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;CAGvC"}
package/dist/esm/web.js CHANGED
@@ -1,12 +1,36 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
2
  export class DateTimeSettingWeb extends WebPlugin {
3
- async timeIsAuto() {
3
+ // Date/Time Change Detection
4
+ async detectDateTimeChange() {
4
5
  throw this.unimplemented('Not implemented on web.');
5
6
  }
6
- async timeZoneIsAuto() {
7
+ async detectComprehensiveDateTimeChange() {
7
8
  throw this.unimplemented('Not implemented on web.');
8
9
  }
9
- async openSetting() {
10
+ async detectDateOnlyChange() {
11
+ throw this.unimplemented('Not implemented on web.');
12
+ }
13
+ async detectAndNotifyDateTimeChanges() {
14
+ throw this.unimplemented('Not implemented on web.');
15
+ }
16
+ // Time Utilities
17
+ async getLocalTime() {
18
+ throw this.unimplemented('Not implemented on web.');
19
+ }
20
+ async getInternetUTCTime() {
21
+ throw this.unimplemented('Not implemented on web.');
22
+ }
23
+ async convertToLocalTime(options) {
24
+ throw this.unimplemented('Not implemented on web.');
25
+ }
26
+ // Timestamp Management
27
+ async setStoredTimestamp(options) {
28
+ throw this.unimplemented('Not implemented on web.');
29
+ }
30
+ async getStoredTimestamp() {
31
+ throw this.unimplemented('Not implemented on web.');
32
+ }
33
+ async resetDetector() {
10
34
  throw this.unimplemented('Not implemented on web.');
11
35
  }
12
36
  }
@@ -7,13 +7,37 @@ const DateTimeSetting = core.registerPlugin('DateTimeSetting', {
7
7
  });
8
8
 
9
9
  class DateTimeSettingWeb extends core.WebPlugin {
10
- async timeIsAuto() {
10
+ // Date/Time Change Detection
11
+ async detectDateTimeChange() {
11
12
  throw this.unimplemented('Not implemented on web.');
12
13
  }
13
- async timeZoneIsAuto() {
14
+ async detectComprehensiveDateTimeChange() {
14
15
  throw this.unimplemented('Not implemented on web.');
15
16
  }
16
- async openSetting() {
17
+ async detectDateOnlyChange() {
18
+ throw this.unimplemented('Not implemented on web.');
19
+ }
20
+ async detectAndNotifyDateTimeChanges() {
21
+ throw this.unimplemented('Not implemented on web.');
22
+ }
23
+ // Time Utilities
24
+ async getLocalTime() {
25
+ throw this.unimplemented('Not implemented on web.');
26
+ }
27
+ async getInternetUTCTime() {
28
+ throw this.unimplemented('Not implemented on web.');
29
+ }
30
+ async convertToLocalTime(options) {
31
+ throw this.unimplemented('Not implemented on web.');
32
+ }
33
+ // Timestamp Management
34
+ async setStoredTimestamp(options) {
35
+ throw this.unimplemented('Not implemented on web.');
36
+ }
37
+ async getStoredTimestamp() {
38
+ throw this.unimplemented('Not implemented on web.');
39
+ }
40
+ async resetDetector() {
17
41
  throw this.unimplemented('Not implemented on web.');
18
42
  }
19
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DateTimeSetting = registerPlugin('DateTimeSetting', {\n web: () => import('./web').then(m => new m.DateTimeSettingWeb()),\n});\nexport * from './definitions';\nexport { DateTimeSetting };\n","import { WebPlugin } from '@capacitor/core';\nexport class DateTimeSettingWeb extends WebPlugin {\n async timeIsAuto() {\n throw this.unimplemented('Not implemented on web.');\n }\n async timeZoneIsAuto() {\n throw this.unimplemented('Not implemented on web.');\n }\n async openSetting() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACpE,CAAC;;ACFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,cAAc,GAAG;AAC3B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DateTimeSetting = registerPlugin('DateTimeSetting', {\n web: () => import('./web').then(m => new m.DateTimeSettingWeb()),\n});\nexport * from './definitions';\nexport { DateTimeSetting };\n","import { WebPlugin } from '@capacitor/core';\nexport class DateTimeSettingWeb extends WebPlugin {\n // Date/Time Change Detection\n async detectDateTimeChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectComprehensiveDateTimeChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectDateOnlyChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectAndNotifyDateTimeChanges() {\n throw this.unimplemented('Not implemented on web.');\n }\n // Time Utilities\n async getLocalTime() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getInternetUTCTime() {\n throw this.unimplemented('Not implemented on web.');\n }\n async convertToLocalTime(options) {\n throw this.unimplemented('Not implemented on web.');\n }\n // Timestamp Management\n async setStoredTimestamp(options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getStoredTimestamp() {\n throw this.unimplemented('Not implemented on web.');\n }\n async resetDetector() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACpE,CAAC;;ACFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD;AACA,IAAI,MAAM,oBAAoB,GAAG;AACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,iCAAiC,GAAG;AAC9C,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,oBAAoB,GAAG;AACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,8BAA8B,GAAG;AAC3C,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;AACA,IAAI,MAAM,YAAY,GAAG;AACzB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,kBAAkB,CAAC,OAAO,EAAE;AACtC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;AACA,IAAI,MAAM,kBAAkB,CAAC,OAAO,EAAE;AACtC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,aAAa,GAAG;AAC1B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -6,13 +6,37 @@ var capacitorDatetimeSetting = (function (exports, core) {
6
6
  });
7
7
 
8
8
  class DateTimeSettingWeb extends core.WebPlugin {
9
- async timeIsAuto() {
9
+ // Date/Time Change Detection
10
+ async detectDateTimeChange() {
10
11
  throw this.unimplemented('Not implemented on web.');
11
12
  }
12
- async timeZoneIsAuto() {
13
+ async detectComprehensiveDateTimeChange() {
13
14
  throw this.unimplemented('Not implemented on web.');
14
15
  }
15
- async openSetting() {
16
+ async detectDateOnlyChange() {
17
+ throw this.unimplemented('Not implemented on web.');
18
+ }
19
+ async detectAndNotifyDateTimeChanges() {
20
+ throw this.unimplemented('Not implemented on web.');
21
+ }
22
+ // Time Utilities
23
+ async getLocalTime() {
24
+ throw this.unimplemented('Not implemented on web.');
25
+ }
26
+ async getInternetUTCTime() {
27
+ throw this.unimplemented('Not implemented on web.');
28
+ }
29
+ async convertToLocalTime(options) {
30
+ throw this.unimplemented('Not implemented on web.');
31
+ }
32
+ // Timestamp Management
33
+ async setStoredTimestamp(options) {
34
+ throw this.unimplemented('Not implemented on web.');
35
+ }
36
+ async getStoredTimestamp() {
37
+ throw this.unimplemented('Not implemented on web.');
38
+ }
39
+ async resetDetector() {
16
40
  throw this.unimplemented('Not implemented on web.');
17
41
  }
18
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DateTimeSetting = registerPlugin('DateTimeSetting', {\n web: () => import('./web').then(m => new m.DateTimeSettingWeb()),\n});\nexport * from './definitions';\nexport { DateTimeSetting };\n","import { WebPlugin } from '@capacitor/core';\nexport class DateTimeSettingWeb extends WebPlugin {\n async timeIsAuto() {\n throw this.unimplemented('Not implemented on web.');\n }\n async timeZoneIsAuto() {\n throw this.unimplemented('Not implemented on web.');\n }\n async openSetting() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpE,CAAC;;ICFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,cAAc,GAAG;IAC3B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DateTimeSetting = registerPlugin('DateTimeSetting', {\n web: () => import('./web').then(m => new m.DateTimeSettingWeb()),\n});\nexport * from './definitions';\nexport { DateTimeSetting };\n","import { WebPlugin } from '@capacitor/core';\nexport class DateTimeSettingWeb extends WebPlugin {\n // Date/Time Change Detection\n async detectDateTimeChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectComprehensiveDateTimeChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectDateOnlyChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectAndNotifyDateTimeChanges() {\n throw this.unimplemented('Not implemented on web.');\n }\n // Time Utilities\n async getLocalTime() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getInternetUTCTime() {\n throw this.unimplemented('Not implemented on web.');\n }\n async convertToLocalTime(options) {\n throw this.unimplemented('Not implemented on web.');\n }\n // Timestamp Management\n async setStoredTimestamp(options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getStoredTimestamp() {\n throw this.unimplemented('Not implemented on web.');\n }\n async resetDetector() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpE,CAAC;;ICFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD;IACA,IAAI,MAAM,oBAAoB,GAAG;IACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,iCAAiC,GAAG;IAC9C,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