def day_of_month(datetimes):
    """Return the day of the month of given dates."""
    return (datetimes.astype('datetime64[D]', copy=False) - datetimes.
        astype('datetime64[M]', copy=False) + 1).astype(int)
