import time


def yearmonthday(t):
    """
    Returns a tuple (year, month, day) with 1 <= month <= 12 
    and 1 <= day <= 31
    """
    return tuple(int(x) for x in time.strftime("%Y %m %d", time.gmtime(t)).split())