Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Riktig formatering av beløp #9

Open
3 tasks
sskagemo opened this issue Feb 23, 2023 · 2 comments
Open
3 tasks

Riktig formatering av beløp #9

sskagemo opened this issue Feb 23, 2023 · 2 comments
Assignees

Comments

@sskagemo
Copy link
Contributor

valuta og riktig skilletegn for tusen og desimal

  • valuta - NOK
  • tusen-skilletegn - '.'
  • desimalskilletegn - ','
@sskagemo sskagemo self-assigned this Feb 25, 2023
@sskagemo
Copy link
Contributor Author

Strevde med denne og fant noe som virket, så lenge jeg gjorde det i "vanlig" python:

>>> import locale
>>> locale.setlocale(locale.LC_MONETARY, 'nb_NO.utf8')
>>> print(locale.currency(tall, symbol=False, grouping=True))
10000000,10

Men når jeg kjører dette i pyscript, får jeg feilmeldingen "Currency formatting is not possible using the 'C' locale.", noe som tyder på at det ikke fungerer å bruke locale.setlocale() i pyscript.

@sskagemo
Copy link
Contributor Author

Har lagt et spørsmål på PyScript Github: pyscript/pyscript#1398

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant