Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/assets')
-rw-r--r--web/assets/js/util/date-util.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/web/assets/js/util/date-util.js b/web/assets/js/util/date-util.js
index 5305455e..50efd6fe 100644
--- a/web/assets/js/util/date-util.js
+++ b/web/assets/js/util/date-util.js
@@ -128,7 +128,7 @@ Date.prototype.formatDateTime = function (split = ' ') {
};
class DateUtil {
- // String string to date object
+ // String to date object
static parseDate(str) {
return new Date(str.replace(/-/g, '/'));
}
@@ -143,4 +143,9 @@ class DateUtil {
date.setMinTime();
return date;
}
+
+ static convertToJalalian(date) {
+ return date && moment.isMoment(date) ? date.format('jYYYY/jMM/jDD HH:mm:ss') : null;
+ }
+
}