date-time-format-timezone icon indicating copy to clipboard operation
date-time-format-timezone copied to clipboard

Object doesn't support property or method 'formatToParts'

Open ellioseven opened this issue 6 years ago • 3 comments

I am trying to do the following:

const date = new Date()
new Intl.DateTimeFormat("en", {
  timeZone: "en",
  weekday: 'long',
  year: 'numeric',
  month: 'numeric',
  day: 'numeric',
  hour: 'numeric',
  minute: 'numeric',
  second: 'numeric',
  hour12: true
}).formatToParts(date)

However, I am getting the following in IE11:

Object doesn't support property or method 'formatToParts'

Am I missing something here? I can see from the previous issues that this is/was suppported.

ellioseven avatar Jul 22 '19 06:07 ellioseven

hi I am getting the same error, any updates on this?

ahopkins94 avatar Oct 10 '19 10:10 ahopkins94

I'm seeing this too. Did you figure out how to fix this?

Sushindhran avatar Nov 21 '19 19:11 Sushindhran

Hi Guys This polyfill does not formatToParts We will remove the half baked support we have as of now.

This support only works if you use intl polyfill, or if your browser supports

markandey avatar Nov 26 '19 22:11 markandey