-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Instances for Currency #4562
Comments
Every time I ask "why don't we support ____" from |
Lack of support on JS/Native doesn't need to stop us. We can add the instances only for JVM, or add them for all platforms but test only on JVM. |
Check out the Typelevel Squants project, one of my favorite projects.
Squants includes type-safe value objects representing daily things,
including currency.
import squants.market._
val usd3 = USD(30)
usd3.toFormattedString should be ("$30.00");
val usd = USD(30)
val usd2 = USD(50)
val total = usd + usd2
total should be(USD(80))
…On Mon, Feb 19, 2024 at 12:21 PM Arman Bilge ***@***.***> wrote:
Lack of support on JS/Native doesn't need to stop us. We can add the
instances only for JVM, or add them for all platforms but test only on JVM.
—
Reply to this email directly, view it on GitHub
<#4562 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADEJBLDQBCGKMZ5J3SN4E3YUOQ3HAVCNFSM6AAAAABDP52CFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJTGA2DSOJUGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Some times we found libraries that filled the gap, like scala-java-time in cats-time. |
Actually there was a proposal to move |
@dhinojosa thanks for pointing me to squants, I'll play with it and see if it suits in our project. |
|
Hi,
I often work with the java
Currency
type, but wasn't able to find the basic instances for that, e.g.Show
andEq
.I also looked in the
mouse
project.Would them be a good fit somewhere?
The text was updated successfully, but these errors were encountered: