xe.com cannot convert currency

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
Cube8

xe.com cannot convert currency

Unread post by Cube8 » 2021-03-24, 18:19

Upon load, the first page shows this error:
(intermediate value).formatToParts is not a function

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35478
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: xe.com cannot convert currency

Unread post by Moonchild » 2021-03-25, 06:52

Tell the webmaster?
Or just use a different website like fxexchange.com
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: xe.com cannot convert currency

Unread post by vannilla » 2021-03-25, 07:48

It seems Pale Moon doesn't actually have that function, though, but I haven't investigated particularly far beyond following an example on MDN.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35478
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: xe.com cannot convert currency

Unread post by Moonchild » 2021-03-25, 08:17

vannilla wrote:
2021-03-25, 07:48
It seems Pale Moon doesn't actually have that function
Yes it does! e.g.:

Code: Select all

var date = Date.UTC(2012, 11, 17, 3, 0, 42);

var formatter = new Intl.DateTimeFormat('en-us', {
  weekday: 'long',
  year: 'numeric',
  month: 'numeric',
  day: 'numeric',
  hour: 'numeric',
  minute: 'numeric',
  second: 'numeric',
  fractionalSecondDigits: 3,
  hour12: true,
  timeZone: 'UTC'
});

formatter.format(date);
// "Monday, 12/17/2012, 3:00:42.000 AM"
formatter.formatToParts(date);
// return value:
[
  { type: 'weekday',   value: 'Monday' },
  { type: 'literal',   value: ', '     },
  { type: 'month',     value: '12'     },
  { type: 'literal',   value: '/'      },
  { type: 'day',       value: '17'     },
  { type: 'literal',   value: '/'      },
  { type: 'year',      value: '2012'   },
  { type: 'literal',   value: ', '     },
  { type: 'hour',      value: '3'      },
  { type: 'literal',   value: ':'      },
  { type: 'minute',    value: '00'     },
  { type: 'literal',   value: ':'      },
  { type: 'second',    value: '42'     },
  { type: 'fractionalSecond', value: '000' },
  { type: 'literal',   value: ' '      },
  { type: 'dayPeriod', value: 'AM'     }
]
Works just fine.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: xe.com cannot convert currency

Unread post by vannilla » 2021-03-25, 12:45

Well, it seems it's real. Then I don't know why it gave me an error when I tested it.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: xe.com cannot convert currency

Unread post by Kris_88 » 2021-03-25, 13:16

Code: Select all

r=new Intl.NumberFormat('en-US',{style:"currency",currency:"USD"}).formatToParts(12345.6789);

/*
Exception: TypeError: (intermediate value).formatToParts is not a function
@Scratchpad/1:10:3
*/
Last edited by Kris_88 on 2021-03-25, 13:30, edited 1 time in total.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: xe.com cannot convert currency

Unread post by Kris_88 » 2021-03-25, 13:28

https://developer.mozilla.org/en-US/doc ... matToParts

Code: Select all

var number = 3500;
var formatter = new Intl.NumberFormat('de-DE', {
  style: 'currency',
  currency: 'EUR'
});
formatter.format(number);
formatter.formatToParts(number);


/*
Exception: TypeError: formatter.formatToParts is not a function
@Scratchpad/1:16:1
*/
Last edited by Kris_88 on 2021-03-25, 13:30, edited 1 time in total.

New Tobin Paradigm

Re: xe.com cannot convert currency

Unread post by New Tobin Paradigm » 2021-03-25, 13:29

Code tags damn it.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: xe.com cannot convert currency

Unread post by Kris_88 » 2021-03-25, 13:31

Off-topic:
New Tobin Paradigm wrote:
2021-03-25, 13:29
Code tags damn it.
:D

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35478
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: xe.com cannot convert currency

Unread post by Moonchild » 2021-03-28, 08:34

I sent them a message (since it seems nobody here so far did?)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: xe.com cannot convert currency

Unread post by moonbat » 2021-03-28, 08:36

Moonchild wrote:
2021-03-25, 06:52
Or just use a different website like fxexchange.com
That's defunct, goes to a domain parking page now.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35478
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: xe.com cannot convert currency

Unread post by Moonchild » 2021-03-28, 08:45

Attachments
FireShot Pro Screen Capture #260 - 'FX Exchange Rate' - www_fxexchangerate_com.jpg
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: xe.com cannot convert currency

Unread post by moonbat » 2021-03-28, 08:48

It's a shame they don't use URL parameters and force you to use the form on their page instead. I had created a multi parameter quicksearch for xe.com to convert currency and specify from and to currencies, now stuck until they fix their page.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35478
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: xe.com cannot convert currency

Unread post by Moonchild » 2021-03-28, 08:54

fxexchangerate.com uses subdomains.

e.g. for history at a certain date for a certain pair:

Code: Select all

https://usd.fxexchangerate.com/sek-2021_02_28-exchange-rates-history.html
https:// {from} .fxexchangerate.com/ {to} - {ISO date} -exchange-rates-history.html

or to convert a certain amount directly:

Code: Select all

https://usd.fxexchangerate.com/eur/123.33-currency-rates.html
https:// {from} .fxexchangerate.com/ {to} / {amount} -currency-rates.html
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: xe.com cannot convert currency

Unread post by moonbat » 2021-03-28, 12:44

Ah, didn't notice that. Thanks :thumbup:
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: xe.com cannot convert currency

Unread post by Kris_88 » 2021-03-29, 06:38

Moonchild wrote:
2021-03-28, 08:34
I sent them a message (since it seems nobody here so far did?)
And what is the point?
Indeed, the developers of sites have a strange tendency to use the newest constructions to the detriment of compatibility. But this truck does not stop.
It is necessary either to add support for these functions into the browser or implement the mechanism of polyfills as a temporary solution.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35478
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: xe.com cannot convert currency

Unread post by Moonchild » 2021-03-29, 08:47

Kris_88 wrote:
2021-03-29, 06:38
And what is the point?
The point, my dear doomsayer, is that webmasters tend to not be aware of things if they are only testing in Chrome.
If we were to go by your attitude then we may as well all just pack up and leave and tell everyone to use Google Chrome because it happens to have the largest marketshare.

Also, this isn't even a web compat mismatch but looks like a genuine bug since we DO support the function it complains about.

So what's the point? Calling attention to a bug or, if not, to an accessibility issue if people can't view or use the site.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: xe.com cannot convert currency

Unread post by Kris_88 » 2021-03-29, 09:55

Moonchild wrote:
2021-03-29, 08:47
The point, my dear doomsayer,
I am not doomsayer :)
Moonchild wrote:
2021-03-29, 08:47
Also, this isn't even a web compat mismatch but looks like a genuine bug since we DO support the function it complains about.
Unfortunately you do NOT support the function Intl.NumberFormat.prototype.formatToParts().
You DO support Intl.DateTimeFormat.prototype.formatToParts().

https://tc39.es/ecma402/#sec-intl.numbe ... mattoparts

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35478
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: xe.com cannot convert currency

Unread post by Moonchild » 2021-03-29, 11:02

Why is that even a thing?

Numbers aren't different depending on where you live :P 1000 is still 1000

But hey, patches are welcome.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: xe.com cannot convert currency

Unread post by vannilla » 2021-03-29, 11:29

Moonchild wrote:
2021-03-29, 11:02
Numbers aren't different depending on where you live :P 1000 is still 1000
Not really, in some places 1000 is 一千 and in others it's 1,000.

Locked