Change date format to European (DD/MM/YYYY) and add explanation for sats

- Updated date formatting in calculate.js to use 'en-GB' locale for European date format (DD/MM/YYYY)
- Added explanatory text "(smallest unit of Bitcoin)" next to "sats" in the main heading
This commit is contained in:
Claude
2025-11-22 15:49:15 +00:00
parent 9e0b960fed
commit 58641b2d3d
2 changed files with 2 additions and 2 deletions

View File

@@ -80,7 +80,7 @@ module.exports = {
year = date.getFullYear();
rawsat = hist_entries[v]['sateur_rate']
percentage = (-100 * ((rawsat - today_sats) / rawsat)).toFixed(3)
final_list.push({ "year": date.toLocaleDateString(), "sats": rawsat.toLocaleString("en-US"), "percent": percentage });
final_list.push({ "year": date.toLocaleDateString('en-GB'), "sats": rawsat.toLocaleString("en-US"), "percent": percentage });
}
return final_list
} catch (error) {

View File

@@ -46,7 +46,7 @@
<div class="container" style="margin-top: 20px;">
<div class="row">
<center>
<h3> {{ Title }} <span id="current"></span> sats</h3>
<h3> {{ Title }} <span id="current"></span> sats <small>(smallest unit of Bitcoin)</small></h3>
</center>
<script>
var currentPrice = 0;