summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wührer <david.wuhrer@flavia-it.de>2024-05-21 14:55:26 +0200
committerDavid Wührer <david.wuhrer@flavia-it.de>2024-05-21 15:09:47 +0200
commit00171f2171d47b917912139a48b8c6ffa64778cf (patch)
tree5ee864ed83a45d280e8afbaec61f65714d196b4d
parent77cfffee6177fb0421fa0fce15d6a1875bde4816 (diff)
yamlbrowser: add datetime
-rwxr-xr-xbin/yamlbrowser2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/yamlbrowser b/bin/yamlbrowser
index 92068b4..7b5e9a9 100755
--- a/bin/yamlbrowser
+++ b/bin/yamlbrowser
@@ -4,6 +4,7 @@ import sys
import yaml
from qtpy import QtGui, QtWidgets, QtCore
from qtpy.QtWidgets import QApplication, QTreeWidget, QTreeWidgetItem, QLabel
+from datetime import datetime
def _make_children (parent:QTreeWidgetItem, d) -> QTreeWidgetItem:
"""
@@ -26,6 +27,7 @@ def _make_children (parent:QTreeWidgetItem, d) -> QTreeWidgetItem:
, int: lambda p, d : QTreeWidgetItem ([p.text (0), str(d)])
, float: lambda p, d : QTreeWidgetItem ([p.text (0), str(d)])
, bool: lambda p, d : QTreeWidgetItem ([p.text (0), str(d)])
+ , datetime: lambda p, d : QTreeWidgetItem ([p.text (0), str(d)])
, type(None): lambda p, d : QTreeWidgetItem ([p.text (0), str(d)])
}[type (d)] (parent, d)