dmn-eval-js-es5
Version:
Evaluation of DMN 1.1 decision tables, limited to S-FEEL (Simple Friendly Enough Expression Language), es5 browser compatible
35 lines (27 loc) • 886 B
JavaScript
;
/*
*
* ©2016-2017 EdgeVerve Systems Limited (a fully owned Infosys subsidiary),
* Bangalore, India. All Rights Reserved.
*
*/
var moment = require('moment');
var _require = require('../../helper/meta'),
time_ISO_8601 = _require.time_ISO_8601,
date_ISO_8601 = _require.date_ISO_8601;
var setTimezone = function setTimezone(obj, timezoneId) {
return obj.tz(timezoneId);
};
var formatDateTime = function formatDateTime(obj) {
return moment(obj).format();
};
var formatDate = function formatDate(obj) {
return moment(obj).format(date_ISO_8601);
};
var formatTime = function formatTime(obj) {
return moment(obj).format(time_ISO_8601);
};
var format = function format(obj, fmt) {
return obj.format(fmt);
};
module.exports = { setTimezone: setTimezone, formatDateTime: formatDateTime, formatDate: formatDate, formatTime: formatTime, format: format };