def duration360days(Ndays):
    """
    Convers a number o days into duration tuple (years, months, days)
    in a 360/30 day counting convention.

    :param Ndays:   Number of days
    :return:        Tuple (years, monhts, days)
    :type Ndays:    int
    :rtype:         tuple(int, int, int)

    Example:
    >>> from m2py.finance import dtime as dt
    >>> dt.duration360days(1321)
    >>> (3, 8, 1)

    1321 days = 3 years, 8 months and 1 day
    """

    years = int(Ndays / 360)
    rem = Ndays % 360
    months = int(rem / 30)
    days = rem % 30

    return (years, months, days)