Bug 33132: [22.05.x] Add date_to_rfc3339

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2023-06-02 09:10:13 +02:00 committed by Lucas Gass
parent e8072773f9
commit d459d16f2d
1 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,12 @@
return m.format(get_time_pattern(timeformat)+(dateformat=='rfc3339'?':ss'+(!m.isUTC()?'Z':''):''))+(dateformat=='rfc3339' && m.isUTC()?'Z':'');
}
window.$date_to_rfc3339 = function(value, options) {
var dateformat = (options&&options.dateformat)||def_date_format;
let m = moment(value, get_date_pattern(dateformat));
return m.format("YYYY-MM-DD");
}
})();
</script>
<!-- / js-date-format.inc -->