feat(core-shared): add toIsoString helper
This commit is contained in:
5
packages/core-shared/src/lib/date.ts
Normal file
5
packages/core-shared/src/lib/date.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export function toIsoString(input: Date | string | null | undefined): string | null {
|
||||
if (input === null || input === undefined) return null;
|
||||
if (input instanceof Date) return input.toISOString();
|
||||
return input;
|
||||
}
|
||||
Reference in New Issue
Block a user