code: function parserFabric(mode, format) {
      return function (value, parseFn) {
          parseFn = parseFn || moment_1.utc;
          if (value === null || value === undefined || value === "") {
              return null;
          }
          var formatsToParse = parseFormat[mode || "date"];
          return parseFn(value, [format].concat(formatsToParse), true);
      };
  }
docs: Parses the given value as date using moment.js.
  If value cannot be parsed the invalid Moment object is returned.
  The calling code should not assume if the method returns local or utc value and
  must convert value to corresponding form itself.