EHRGym / apps /ehr /lib /chart.ts
adtserapio's picture
Include EHR app lib files
8364663
raw
history blame contribute delete
330 Bytes
type JsonValue = string | string[] | Record<string, string>;
export function parseJsonValue<T extends JsonValue>(value: string): T {
return JSON.parse(value) as T;
}
export function formatDateTime(value: Date) {
return new Intl.DateTimeFormat("en-US", {
dateStyle: "medium",
timeStyle: "short"
}).format(value);
}