Files
purple-explorer/views/includes/common.pug
T
Joe Uhren a47baa1928 Update all script libraries (except bootstrap)
-jQuery updated to v3.6.0
-DataTables updated to v1.11.3
-FontAwesome updated to v5.15.4
-Luxon updated to v2.1.1 (Removed js file from project and added CDN url)
-jqPlot (No update in version but removed js/css files from project and added CDN urls)
-Chart.js updated to v3.6.1 (Removed js file from project and added CDN url + fixed breaking changes in Reward page)
-flag-icon-css updated to v4.1.4 (Removed source files from project and added CDN url)
2021-12-04 17:54:52 -07:00

11 lines
695 B
Plaintext

script(type='text/javascript', src='https://cdn.jsdelivr.net/npm/luxon@2.1.1/build/global/luxon.min.js')
script.
function format_unixtime(unixtime, alt) {
if (alt == null)
alt = false;
// check if this date should be displayed in utc or local timezone
if (('#{settings.shared_pages.date_time.timezone}'.toLowerCase() == 'local' && !alt) || ('#{settings.shared_pages.date_time.timezone}'.toLowerCase() == 'utc' && alt))
return luxon.DateTime.fromSeconds(unixtime).toLocal().toFormat('#{settings.shared_pages.date_time.display_format}');
else
return luxon.DateTime.fromSeconds(unixtime).toUTC().toFormat('#{settings.shared_pages.date_time.display_format}');
}