mirror of
https://github.com/aljazceru/satshkd-vercel.git
synced 2025-12-18 05:34:22 +01:00
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:
@@ -80,7 +80,7 @@ module.exports = {
|
|||||||
year = date.getFullYear();
|
year = date.getFullYear();
|
||||||
rawsat = hist_entries[v]['sateur_rate']
|
rawsat = hist_entries[v]['sateur_rate']
|
||||||
percentage = (-100 * ((rawsat - today_sats) / rawsat)).toFixed(3)
|
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
|
return final_list
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<div class="container" style="margin-top: 20px;">
|
<div class="container" style="margin-top: 20px;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<center>
|
<center>
|
||||||
<h3> {{ Title }} <span id="current"></span> sats</h3>
|
<h3> {{ Title }} <span id="current"></span> sats <small>(smallest unit of Bitcoin)</small></h3>
|
||||||
</center>
|
</center>
|
||||||
<script>
|
<script>
|
||||||
var currentPrice = 0;
|
var currentPrice = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user