mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-05 20:28:25 +02:00
19 lines
334 B
QML
19 lines
334 B
QML
pragma Singleton
|
|
import QtQuick
|
|
|
|
// Noctalia compat shim.
|
|
QtObject {
|
|
function getFormattedTimestamp() {
|
|
return new Date().toISOString()
|
|
}
|
|
|
|
function nowMs() {
|
|
return Date.now()
|
|
}
|
|
|
|
function formatDate(date, fmt) {
|
|
if (!date) date = new Date()
|
|
return Qt.formatDateTime(date, fmt || "yyyy-MM-dd HH:mm:ss")
|
|
}
|
|
}
|