Fix invalid relativedelta_kwds
State: closed

- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Docs
name: Frequency
description: DateOffsets

Comments:
add a whatsnew entry. let's add/update a doc-string for DateOffset.
> add a whatsnew entry

Saying what?  This shouldn't change anything user-facing.

> let's add/update a doc-string for DateOffset

Sure.  Just in `DateOffset.__doc__` listing valid kwargs?
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19398?src=pr&el=h1) Report
> Merging [#19398](https://codecov.io/gh/pandas-dev/pandas/pull/19398?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/ed10bf618b93726c61ed9b3ebbc3031416bc1263?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/19398/graphs/tree.svg?token=eZ4WkYLtcO&width=650&src=pr&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/19398?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #19398   +/-   ##
=======================================
  Coverage    91.6%    91.6%           
=======================================
  Files         150      150           
  Lines       48750    48750           
=======================================
  Hits        44657    44657           
  Misses       4093     4093
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.97% <ø> (ø)` | :arrow_up: |
| #single | `41.75% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19398?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/tseries/offsets.py](https://codecov.io/gh/pandas-dev/pandas/pull/19398/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvb2Zmc2V0cy5weQ==) | `97% <ø> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19398?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19398?src=pr&el=footer). Last update [ed10bf6...fe882f1](https://codecov.io/gh/pandas-dev/pandas/pull/19398?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Just added relativedelta params to the DateOffset docstring... not wild about encouraging users to use these.
There is another subtle problem here in that if relativedelta kwargs are passed _and_ nano kwargs are passed, the nano is silently ignored (except in `__repr__`).  I'll edit to raise instead of silently being incorrect.

@jorisvandenbossche 's formatting idea makes sense.
Temporarily closing to clear out the queue
@datapythonista thoughts on how to handle the doc string here?
What do you think about something like this?

```
class DateOffset(BaseOffset):
    """
    Standard kind of date increment used for a date range.

    Works exactly like relativedelta in terms of the keyword args you
    pass in, use of the keyword n is discouraged-- you would be better
    off specifying n in the keywords you use, but regardless it is
    there for you. n is needed for DateOffset subclasses.

    DateOffets work as follows.  Each offset specify a set of dates
    that conform to the DateOffset.  For example, Bday defines this
    set to be the set of dates that are weekdays (M-F).  To test if a
    date is in the set of a DateOffset dateOffset we can use the
    onOffset method: dateOffset.onOffset(date).

    If a date is not on a valid date, the rollback and rollforward
    methods can be used to roll the date to the nearest valid date
    before/after the date.

    DateOffsets can be created to move dates forward a given number of
    valid dates.  For example, Bday(2) can be added to a date to move
    it two business days forward.  If the date does not start on a
    valid date, first it is moved to a valid date.  Thus pseudo code
    is:

    def __add__(date):
      date = rollback(date) # does nothing if date is valid
      return date + <n number of periods>

    When a date offset is created for a negative number of periods,
    the date is first rolled forward.  The pseudo code is:

    def __add__(date):
      date = rollforward(date) # does nothing is date is valid
      return date + <n number of periods>

    Zero presents a problem.  Should it roll forward or back?  We
    arbitrarily have it rollforward:

    date + BDay(0) == BDay.rollforward(date)

    Since 0 is a bit weird, we suggest avoiding its use.

    Parameters
    ----------
    n : int, default 1
        ADD SHORT DESCRIPTION HERE
    normalize : bool, default False
        ADD SHORT DESCRIPTION HERE
    **kwds
        Temporal parameter that add to or replace the offset value.

        Parameters that **add** to the offset (like Timedelta):

        - years
        - months
        - weeks
        - days
        - hours
        - minutes
        - seconds
        - microseconds
        - nanoseconds

        Parameters that **replace** the offset value:

        - year
        - month
        - day
        - weekday
        - hour
        - minute
        - second
        - microsecond
        - nanosecond

    See Also
    --------
    dateutil.relativedelta.relativedelta

    Examples
    --------
    >>> ts = pd.Timestamp('2017-01-01 09:10:11')
    >>> ts + DateOffset(months=3)
    Timestamp('2017-04-01 09:10:11')

    >>> ts = pd.Timestamp('2017-01-01 09:10:11')
    >>> ts + DateOffset(month=3)
    Timestamp('2017-03-01 09:10:11')
    """
```

![screenshot at 2018-07-10 23-17-58](https://user-images.githubusercontent.com/10058240/42550501-d0c42292-8497-11e8-899f-382e50020b90.png)

Implemented @datapythonista's suggestion, reopening.
thanks @jbrockmendel and @datapythonista 

I think the doc-string is pretty good. maybe add some more examples?