3 lines
136 B
TypeScript
3 lines
136 B
TypeScript
export const publishedToDate = (published: string): Date =>
|
|
published.endsWith('Z') ? new Date(published) : new Date(`${published}Z`)
|