#Astro compiles .toLocaleString differently from the Browser

1 messages · Page 1 of 1 (latest)

halcyon goblet
#

(1000).toLocaleString("pt-PT", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
Browser will compile it to "1 000,00"
Astro will result in "1000,00"

Is this some TS behavior? Is there a config for this?

solar trail
#

TS gets transpiled to JS, so probably not.
Have you tried different browsers?
Have you tried your code on StackBlitz or CodePen?
That might help you determine which is "standard" and which is different.

halcyon goblet
#

i've seen 2 stackoverflow issues, they point to different versioning/standards

#

i'll try StackBlitz or CodePen

#

but all i need is for it to be consistent

#

maybe i have to be more specific on the options on the format

solar trail
halcyon goblet
#

yea, will do my own custom formatting to ensure is consistent

#

Thanks for your help, you point me in good direction