aboutsummaryrefslogtreecommitdiff
path: root/karlgui/src/helper.rs
diff options
context:
space:
mode:
Diffstat (limited to 'karlgui/src/helper.rs')
-rw-r--r--karlgui/src/helper.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/karlgui/src/helper.rs b/karlgui/src/helper.rs
index eb4c981..4f8f4f4 100644
--- a/karlgui/src/helper.rs
+++ b/karlgui/src/helper.rs
@@ -1,6 +1,11 @@
+use chrono::NaiveDateTime;
use egui::{DragValue, Ui};
use karlcommon::Property;
+pub fn from_timestamp(t: i64) -> NaiveDateTime {
+ NaiveDateTime::from_timestamp(t, 0)
+}
+
pub fn format_value(prop: Property, value: i64) -> String {
match prop {
Property::Year => format!("{value}"),