ZoneAnswertype
A zone, and whether it was worked out rather than read: estimated is true where kuni had to choose.
Import it
import type { ZoneAnswer } from "@johnmorrisdotca/kuni/zones";
Definition
interface ZoneAnswer {
zone: string;
estimated: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
zone | string | The IANA zone, "America/Los_Angeles". |
estimated | boolean | True where kuni chose it (nearest a capital or a point), false where a source names it alone. |
Examples
import { subdivisionTimeZone, type ZoneAnswer } from "@johnmorrisdotca/kuni/zones";
const answer: ZoneAnswer | null = subdivisionTimeZone("CA-BC");
console.log(answer?.zone); // "America/Vancouver"America/VancouverWhat it prints (run when this page was built)