oksy 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,7 @@
1
1
  import dayjs, { Dayjs } from 'dayjs';
2
2
  export declare function nowAsUtc(): dayjs.Dayjs;
3
3
  export declare function toSqlDateTime(date: null | Dayjs): null | string;
4
- export declare function parseFromSqlFormat(date: null | string): dayjs.Dayjs | null;
4
+ export declare function parseFromSqlFormat(dateStr: null | string): null | Dayjs;
5
5
  export declare function isExpired(date: null | Dayjs): boolean;
6
+ export declare function utcToTz(date: null | Dayjs, tz: string): null | Dayjs;
7
+ export declare function parseDateTimeString(dateTimeStr: null | string, tz: string): null | Dayjs;
@@ -1,12 +1,15 @@
1
+ import { Dayjs } from 'dayjs';
1
2
  import { WebSocket as WebSocketClient } from 'ws';
2
3
  import { BaseCommunicator } from './BaseCommunicator';
3
4
  export declare class WebSocketServerClient extends BaseCommunicator {
4
5
  private client;
6
+ timeZone: string;
5
7
  id: string;
6
- constructor(client: WebSocketClient);
8
+ constructor(client: WebSocketClient, timeZone: string);
7
9
  send(payload: object): void;
8
10
  toast(type: 'success' | 'error', message: string): void;
9
11
  prompt(message: string): Promise<string>;
10
12
  confirm(title: string, message: string, primaryButtonText?: string): Promise<boolean>;
13
+ toLocalDate(utcDate: null | Dayjs): null | Dayjs;
11
14
  navigate(url: string, type?: 'push' | 'replace' | 'hard' | 'blank'): void;
12
15
  }