code: function fidjFormat(input) {
  
      if (fidj.isUndefined(input) || !input) {
          fidj.ErrorLog.log('fidjFormat', 'invalid string ' + input);
          return '';
      }
  
      var formatted = input;
      var max = arguments.length;
      for (var i = 1; i < max; i++) {
          var regexp = new RegExp('\\{' + (i - 1) + '\\}', 'gi');
          formatted = formatted.replace(regexp, arguments[i]);
      }
      return formatted;
  }
docs: BEWARE : timestamps from Saleforce are in SECONDS, while timestamp in Javascript is in MILLI-SECONDS since 1/1/1970.