You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cookbook.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ The patterns demonstrated in this cookbook are not unique to JavaScript - they r
26
26
27
27
### Python
28
28
29
-
Python includes the `decimal` module in its standard library (since 2003):
29
+
Python includes the [`decimal`](https://docs.python.org/3/library/decimal.html) module in its standard library (since 2003):
30
30
31
31
```python
32
32
from decimal import Decimal
@@ -43,7 +43,7 @@ total = subtotal + tax
43
43
print(f"${total:.2f}") # => "$64.92"
44
44
```
45
45
46
-
Python's `Decimal` is widely used in web frameworks like Django and Flask for handling monetary values. The Django ORM includes a `DecimalField` specifically for financial data.
46
+
Python's `Decimal` is widely used in web frameworks like [Django](https://www.djangoproject.com) and [Flask](https://flask.palletsprojects.com/en/stable/) for handling monetary values. Django includes a [`DecimalField`](https://docs.djangoproject.com/en/5.2/ref/models/fields/#decimalfield) specifically for such data.
47
47
48
48
### Java
49
49
@@ -66,7 +66,7 @@ total = total.setScale(2, RoundingMode.HALF_UP);
66
66
System.out.println(total); // => "64.62"
67
67
```
68
68
69
-
`BigDecimal` is the standard approach for financial applications in the Java ecosystem, including frameworks like Spring and Hibernate.
69
+
`BigDecimal` is the standard approach for financial applications in the Java ecosystem, including frameworks like [Spring](https://spring.io/projects/spring-framework) and [Hibernate](https://hibernate.org).
Ruby includes `BigDecimal` in its standard library:
89
+
Ruby includes [`BigDecimal`]((https://ruby-doc.org/3.4.1/exts/json/BigDecimal.html)) in its standard library:
90
90
91
91
```ruby
92
92
require'bigdecimal'
@@ -102,7 +102,7 @@ total = subtotal + tax
102
102
puts"$%.2f"% total # => "$64.92"
103
103
```
104
104
105
-
Ruby on Rails uses [`BigDecimal`](https://ruby-doc.org/3.4.1/exts/json/BigDecimal.html) for handling database `decimal` columns by default, making it the standard approach for money in Rails applications.
105
+
Ruby on Rails uses `BigDecimal` for handling database `decimal` columns by default, making it the standard approach for money in Rails applications.
0 commit comments