Files
noise/public/javascripts/datetime.js
T

16 lines
385 B
JavaScript

// all date and time functions
import { DateTime } from './luxon.min.js'
// Show date and time (every minute)
export const showDate = (sofort) => {
let d = DateTime.now()
if(sofort || d.second === 0) {
$('#h1datum').text(d.toFormat('yyyy-MM-dd HH:mm'))
}
}
export const formatJSDate = (d) => {
return DateTime.fromJSDate(d).toFormat('yyyy-LL-dd HH:mm:ss')
}