Skip to content
This repository was archived by the owner on Jun 27, 2020. It is now read-only.
This repository was archived by the owner on Jun 27, 2020. It is now read-only.

timeZoneName value is empty in PhantomJS  #19

@alexpol044

Description

@alexpol044

I am using Intl.js + date-time-format-timezone polyfills.

I expect to see timeZoneName value in formatToPart() output.

Run

 const formatter2 = new Intl.DateTimeFormat('en, {
                timeZone: 'Asia/Calcutta',
                timeZoneName: 'long',
                year: 'numeric',
                month: 'numeric',
                day: 'numeric',
                hour: 'numeric',
                minute: 'numeric',
 }).formatToParts(new Date());

Output:
PhantomJS 2.1.1 (Mac OS X 0.0.0): [Object{type: 'month', value: '2'}, Object{type: 'literal', value: '/'}, Object{type: 'day', value: '28'}, Object{type: 'literal', value: '/'}, Object{type: 'year', value: '2018'}, Object{type: 'literal', value: ', '}, Object{type: 'hour', value: '7'}, Object{type: 'literal', value: ':'}, Object{type: 'minute', value: '25'}, Object{type: 'literal', value: ' '}, Object{type: 'dayPeriod', value: 'PM'}, Object{type: 'literal', value: ' '}, Object{type: 'timeZoneName', value: ''}]

As you can see timeZoneName value is empty.

With format() call output is:
'3/1/2018, 12:58 AM India Standard Time'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions