summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--derelict.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/derelict.js b/derelict.js
index cb6d399..48b314f 100644
--- a/derelict.js
+++ b/derelict.js
@@ -31,8 +31,14 @@ class Timeline {
}
setTo(time) {
+ if (!time instanceof Date)
+ time = new Date(time)
this.current = time
}
+
+ getCurrentTime() {
+ return this.current.toLocaleString()
+ }
}
class Grid {