Hacker GitHub

← All repos

eriksencosta/money

View on GitHub ↗ ★ 225 Kotlin

Monetary calculations and allocations made easy

11 mentions on Hacker News by 4 people: 0 stories, 11 comments · first 2024-10-08 · latest 2024-10-11

Mentions per year 11 mentions · busiest year 2024 (11)
20082026
  1. …be tweaked to favour where the additional/missing pennies will be allocated. You can find more at: https://github.com/eriksencosta/money/blob/trunk/docs/usage/...
    comment by eriksencosta · 2024-10-11 · in Show HN: Kotlin Money
  2. …currency (based on CLDR/ICU datasets). Client code can disable rounding at all. Check for more: https://github.com/eriksencosta/money/blob/trunk/docs/usage/...
    comment by eriksencosta · 2024-10-11 · in Show HN: Kotlin Money
  3. What do you think of this? https://github.com/eriksencosta/money/blob/enum-percentage-s... It is a (quick) spike solution, but I've implemented the currency codes as enums and added support for 20.percent. Not so sure about supporting…
    comment by eriksencosta · 2024-10-11 · in Show HN: Kotlin Money
  4. …it is. However, you must create a custom currency to arbitrarily define the minor units you need: https://github.com/eriksencosta/money/blob/trunk/docs/usage/...
    comment by eriksencosta · 2024-10-08 · in Show HN: Kotlin Money
  5. It looks like multiple exchange rates per currency pair is supported: https://github.com/eriksencosta/money/blob/4bef95a1d2158e308...
    comment by __MatrixMan__ · 2024-10-08 · in Show HN: Kotlin Money
  6. …and learn with your implementation. For cryptocurrency data, take a look at the DTIF.org dataset: https://github.com/eriksencosta/money/blob/trunk/docs/append...
    comment by eriksencosta · 2024-10-08 · in Show HN: Kotlin Money
  7. The library will throw an exception if doing an operation with different currencies: https://github.com/eriksencosta/money/blob/trunk/money/src/t... But I think I'll make it explicit in the documentation. Thanks for pointing out!
    comment by eriksencosta · 2024-10-08 · in Show HN: Kotlin Money
  8. …I embedded cryptocurrency data in the mix. Anyway, the library uses the CLDR dataset through ICU: https://github.com/eriksencosta/money/blob/trunk/docs/append...
    comment by eriksencosta · 2024-10-08 · in Show HN: Kotlin Money
  9. Thanks for the questions. Answers: 1. You get an exception 2. You may specify the rounding rule: https://github.com/eriksencosta/money/blob/trunk/docs/usage/... 3. It has some parsing capabilities. The extra digit is kept, rounding is only…
    comment by eriksencosta · 2024-10-08 · in Show HN: Kotlin Money
  10. Yeah, that's just an infix function that provides some default parameters to this extension method: https://github.com/eriksencosta/money/blob/4bef95a1d2158e308...
    comment by lolinder · 2024-10-08 · in Show HN: Kotlin Money
  11. https://github.com/eriksencosta/money/blob/4bef95a1d2158e308...
    comment by zellyn · 2024-10-08 · in Show HN: Kotlin Money