diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-07-13 02:38:51 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-07-13 02:38:51 +0300 |
| commit | 76fdfb2ef2083563cebaca0f05d823653df18e05 (patch) | |
| tree | de87da29e698adca42c98fe1e7ac2ca102d42284 /web/assets | |
| parent | 80180231872375c335a36f8d6bb79442277b823e (diff) | |
date format - jalalian
Diffstat (limited to 'web/assets')
| -rw-r--r-- | web/assets/js/util/date-util.js | 7 |
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; + } + } |
