mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 07:34:43 +00:00
Playing around with local date time parsing.
This commit is contained in:
@@ -26,6 +26,16 @@ $.ajaxSetup({
|
||||
}
|
||||
});
|
||||
|
||||
function parseToLocalDates() {
|
||||
"use strict";
|
||||
$('span.date-time').each(function () {
|
||||
var date = $(this).data('date');
|
||||
var obj = moment.utc(date).local();
|
||||
var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
$(this).text(obj.format(date_time_js) + ' ('+ timeZone +')');
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
@@ -96,6 +106,9 @@ $(function () {
|
||||
// trigger list thing
|
||||
listLengthInitial();
|
||||
|
||||
// update dates:
|
||||
parseToLocalDates();
|
||||
|
||||
});
|
||||
|
||||
function currencySelect(e) {
|
||||
|
Reference in New Issue
Block a user