diff src/implab/text/format.js @ 9:37e9e6bbe87a

added iso formatter to Date type ex.: '{0:iso}'
author cin
date Mon, 26 Jun 2017 13:27:27 +0300
parents 93fb6c09f2e1
children f750c89976d3
line wrap: on
line diff
--- a/src/implab/text/format.js	Tue Jun 20 19:45:15 2017 +0300
+++ b/src/implab/text/format.js	Mon Jun 26 13:27:27 2017 +0300
@@ -40,6 +40,8 @@
                     selector : m[2],
                     formatLength : m[1]
                 });
+            else if (pattern == "iso")
+                return value.toISOString();
             else
                 return date.format(value, {
                     selector : "date",