2019-12-22a few seconds read (About 78 words)How to get ISO string from date in JavascriptIssue #552 1234567891011121314151617181920212223242526272829type Components = { day: number, month: number, year: number}export default class DateFormatter { // 2018-11-11T00:00:00 static ISOStringWithoutTimeZone = (date: Date): string => { const components = DateFormatter.format(DateFormatter.components(date)) return `${components.year}-${components.month}-${components.day}T00:00:00` } static format = (components: Components) => { return { day: `${components.day}`.padStart(2, '0'), month: `${components.month}`.padStart(2, '0'), year: components.year } } static components = (date: Date): Components => { return { day: date.getDate(), month: date.getMonth() + 1, year: date.getFullYear() } }} Read more https://stackoverflow.com/a/53298976/1418457 #javascript