whole_func_string: function formatDate(formatter, dateValue) {
    var dateMs;
    if (IS_UNDEFINED(dateValue)) {
      dateMs = %DateCurrentTime();
    } else {
      dateMs = TO_NUMBER(dateValue);
    }
  
    if (!NUMBER_IS_FINITE(dateMs)) throw MakeRangeError(kDateRange);
  
    return %InternalDateFormat(%GetImplFromInitializedIntlObject(formatter),
                               new GlobalDate(dateMs));
  }
func_code_string: function formatDate(formatter, dateValue) {
    var dateMs;
    if (IS_UNDEFINED(dateValue)) {
      dateMs = %DateCurrentTime();
    } else {
      dateMs = TO_NUMBER(dateValue);
    }
  
    if (!NUMBER_IS_FINITE(dateMs)) throw MakeRangeError(kDateRange);
  
    return %InternalDateFormat(%GetImplFromInitializedIntlObject(formatter),
                               new GlobalDate(dateMs));
  }
func_documentation_string: Returns a String value representing the result of calling ToNumber(date)
  according to the effective locale and the formatting options of this
  DateTimeFormat.