generator-openui5
Version:
OpenUI5 generator for yeoman
21 lines (15 loc) • 494 B
JavaScript
jQuery.sap.declare("<%= fioriComponentNamespace %>.util.Formatter");
<%= fioriComponentNamespace %>.util.Formatter = {
uppercaseFirstChar : function(sStr) {
return sStr.charAt(0).toUpperCase() + sStr.slice(1);
},
discontinuedStatusState : function(sDate) {
return sDate ? "Error" : "None";
},
discontinuedStatusValue : function(sDate) {
return sDate ? "Discontinued" : "";
},
currencyValue : function (value) {
return parseFloat(value).toFixed(2);
}
};