Skip to content

Commit

Permalink
Merge pull request #2102 from malloydata/arreola/no-intl-anymore
Browse files Browse the repository at this point in the history
Drop usage of intl.
  • Loading branch information
nachoarreola authored Jan 17, 2025
2 parents 56e0571 + f3f2a31 commit bcec907
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import {QueryBuilder} from '../types/query-builder';
import {MalloyElement} from '../types/malloy-element';
import {QueryPropertyInterface} from '../types/query-property-interface';
import {DateTime} from 'luxon';

export class TimezoneStatement
extends MalloyElement
Expand All @@ -38,7 +39,7 @@ export class TimezoneStatement

get isValid(): boolean {
try {
Intl.DateTimeFormat(undefined, {timeZone: this.tz});
DateTime.fromISO('2020-02-19T00:00:00', {zone: this.tz});
return true;
} catch {
return false;
Expand Down

0 comments on commit bcec907

Please sign in to comment.