Update to format

This commit is contained in:
William Moore 2024-05-15 05:20:50 -05:00
parent 9b7acec1cc
commit d5375e4bd1

View File

@ -44,11 +44,11 @@ export class Timepiece extends LitElement {
const minutes = date.getUTCMinutes();
const seconds = date.getUTCSeconds();
let dayOfYear = Math.round((this.dayOfTheYear(date)/this.totalDaysInTheYear(date))*10000)/100;
let beats = (hours * 3600 + 60 * minutes + seconds) / 86.4;
beats = Math.round(beats * 100) / 100;
this.setData(`${date.getFullYear()}.${((this.dayOfTheYear(date)/this.totalDaysInTheYear(date))*100).toFixed(0)}@${beats.toFixed(2)}`);
this.setData(`${date.getFullYear()}#${dayOfYear}@${beats.toFixed(2)}`);
setTimeout(() => this.reloadTime(), 100);
}