Coder Social home page Coder Social logo

Comments (11)

BenjaminVanRyseghem avatar BenjaminVanRyseghem commented on July 30, 2024

I πŸ‘ both πŸ˜‰

from numbro.

BenjaminVanRyseghem avatar BenjaminVanRyseghem commented on July 30, 2024

maybe introducing a formatCurrencyWithCents could be a thing too πŸ˜‰

from numbro.

BenjaminVanRyseghem avatar BenjaminVanRyseghem commented on July 30, 2024

any progress?

from numbro.

uhho avatar uhho commented on July 30, 2024

Yes, I've prepared myself mentally for this task 😸

Please give me few more days, I've been extremely busy this week.

from numbro.

BenjaminVanRyseghem avatar BenjaminVanRyseghem commented on July 30, 2024

ok πŸ˜„ it was just to know, no worry πŸ˜„

from numbro.

BenjaminVanRyseghem avatar BenjaminVanRyseghem commented on July 30, 2024

Sorry to be pushy, but any news here? (it's just that I am super curious to read your implementation πŸ˜„ )

from numbro.

BenjaminVanRyseghem avatar BenjaminVanRyseghem commented on July 30, 2024

@lukaszkrawczyk any progress?

from numbro.

ArmorDarks avatar ArmorDarks commented on July 30, 2024

I guess sames thing is for ru-RU and ru-UA.

In Russia there are two often used $ symbols:

  • Shortened version of rubles: `100 Ρ€ΡƒΠ±.'
  • Official symbol: `100 β‚½'

Same in Ukraine:

  • Shortened version: `100 Π³Ρ€Π½.'
  • Official symbol: `100 β‚΄'

Besides, in some cases users may want to display ISO 4217 code:

  • 100 RUB
  • 100 UAH

Just for the note, symbols and shortened versions in Russia and Ukraine do not depend on number in any way, it's always same.

Maybe we can have somehow more flexible way to configure possible formats for different languages?

from numbro.

mnasyrov avatar mnasyrov commented on July 30, 2024

Hello!
I would be happy if custom culture settings can be passed to format methods directly and they override current settings. It will allow to control which currency symbol should be used by hand at least.

from numbro.

BenjaminVanRyseghem avatar BenjaminVanRyseghem commented on July 30, 2024

sounds like a good idea πŸ˜„ I think moment has a similar feature

from numbro.

ArmorDarks avatar ArmorDarks commented on July 30, 2024

Here is something more to consider http://www.gnu.org/software/libc/manual/html_node/Locale-Names.html#Locale-Names:

Most locale names follow XPG syntax and consist of up to four parts:

language[_territory[.codeset]][@modifier]

For example, the locale name β€˜de_AT.iso885915@euro’ denotes a German-language locale for use in Austria, using the ISO-8859-15 (Latin-9) character set, and with the Euro as the currency symbol.

GNU locales have @modifier part. To be honest, not sure does Microsoft's culture has modifiers too or not, but it seems to be good idea to allow them.

You can see as in example they denote with @modifier type of currency. We can follow up that convention too, so that we could call different currencies:

Besides, with such helper we would be able to call certain locale/culture with not specific to it currency. Like ru-RU@euro β€” to call Russian locale with Euros.

from numbro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.