feat: change utils.formatDate and utils.formatTimestamp (#3583)

This commit is contained in:
dni ⚡
2025-11-26 18:54:09 +01:00
committed by GitHub
parent 5f1cfc0e37
commit f1f6af0e35
17 changed files with 71 additions and 65 deletions
@@ -166,16 +166,14 @@ window.app.component('lnbits-payment-list', {
fiat_currency: data.fiat_currency,
labels: data.labels
}
obj.date = moment.utc(data.created_at).local().format(window.dateFormat)
obj.dateFrom = moment.utc(data.created_at).local().fromNow()
obj.expirydate = moment.utc(obj.expiry).local().format(window.dateFormat)
obj.expirydateFrom = moment.utc(obj.expiry).local().fromNow()
obj.date = this.utils.formatDate(data.created_at)
obj.dateFrom = this.utils.formatDateFrom(data.created_at)
obj.expirydate = this.utils.formatDate(data.expiry)
obj.expirydateFrom = this.utils.formatDateFrom(data.expiry)
obj.msat = obj.amount
obj.sat = obj.msat / 1000
obj.tag = obj.extra?.tag
obj.fsat = new Intl.NumberFormat(window.i18n.global.locale).format(
obj.sat
)
obj.fsat = this.utils.formatSat(obj.sat)
obj.isIn = obj.amount > 0
obj.isOut = obj.amount < 0
obj.isPending = obj.status === 'pending'