def min2str(mins):
    """ convert minutes to days, hours, and minutes """
    days = mins // 1440
    mins -= (days * 1440)
    hours = mins // 60
    mins -= (hours * 60)

    s = ''
    if days > 0:
      s += str(days) + ' days '

    if hours > 0:
      s += str(hours) + ' hr '

    if mins > 0:
      s += str(int(mins)) + ' min';

    if len(s) == 0:
      s = '0'

    return s.rstrip()