summaryrefslogtreecommitdiffstats
path: root/apps/web-shared/src/lib
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-06-02 23:02:47 +0200
committerivarlovlie <git@ivarlovlie.no>2022-06-02 23:02:47 +0200
commitccf06386c6b153fe3c420e9200f481dc085e064a (patch)
tree656b182fa83dfedde0d36f341f15d282e751aa4e /apps/web-shared/src/lib
parent83b11393da8f733c0ffc5abed5d1e0e827d04b61 (diff)
downloadgreatoffice-ccf06386c6b153fe3c420e9200f481dc085e064a.tar.xz
greatoffice-ccf06386c6b153fe3c420e9200f481dc085e064a.zip
refactor: Rename accounts to portal
Diffstat (limited to 'apps/web-shared/src/lib')
-rw-r--r--apps/web-shared/src/lib/helpers.ts16
1 files changed, 0 insertions, 16 deletions
diff --git a/apps/web-shared/src/lib/helpers.ts b/apps/web-shared/src/lib/helpers.ts
index 650bccf..ed526af 100644
--- a/apps/web-shared/src/lib/helpers.ts
+++ b/apps/web-shared/src/lib/helpers.ts
@@ -207,11 +207,6 @@ export function get_selected_options(domElement: HTMLSelectElement): Array<strin
return ret;
}
-export function uuid_v4(): string {
- // @ts-ignore
- return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16));
-}
-
export function random_string(length: number): string {
if (!length) {
throw new Error("length is undefined");
@@ -343,12 +338,6 @@ export function get_style_string(rules: CSSRuleList) {
return styleString;
}
-export function get_local_time_zone_date(date: Date): Date {
- const timeOffsetInMS = new Date().getTimezoneOffset() * 60000;
- date.setTime(date.getTime() - timeOffsetInMS);
- return date;
-}
-
export function parse_iso_local(s: string) {
const b = s.split(/\D/);
//@ts-ignore
@@ -410,11 +399,6 @@ export function resolve_references(json: any) {
return json;
}
-export function to_readable_date_string(date: Date, locale = "nb-NO"): string {
- date.setMinutes(date.getMinutes() - date.getTimezoneOffset());
- return date.toLocaleString(locale);
-}
-
export function get_random_int(min: number, max: number): number {
min = Math.ceil(min);
max = Math.floor(max);