def METHOD_NAME(jdate):
    year = int(jdate[:4])
    jd = int(jdate[4:])
    if ((year%4) == 0):
        if (jd <= 31):
            month = 1
            day = jd
        elif (jd <= 60):
            month = 2
            day = jd - 31
        elif (jd <= 91):
            month = 3
            day = jd - 60
        elif (jd <= 121):
            month = 4
            day = jd - 91
        elif (jd <= 152):
            month = 5
            day = jd - 121
        elif (jd <= 182):
            month = 6
            day = jd - 152
        elif (jd <= 213):
            month = 7
            day = jd - 182
        elif (jd <= 244):
            month = 8
            day = jd - 213
        elif (jd <= 274):
            month = 9
            day = jd - 244
        elif (jd <= 305):
            month = 10
            day = jd - 274
        elif (jd <= 335):
            month = 11
            day = jd - 305
        elif (jd <= 366):
            month = 12
            day = jd - 335
        else:
            print "Not a valid Julian day"
            sys.exit(2)
    elif ((year%4) != 0):
        if (jd <= 31):
            month = 1
            day = jd
        elif (jd <= 59):
            month = 2
            day = jd - 31
        elif (jd <= 90):
            month = 3
            day = jd - 59
        elif (jd <= 120):
            month = 4
            day = jd - 90
        elif (jd <= 151):
            month = 5
            day = jd - 120
        elif (jd <= 181):
            month = 6
            day = jd - 151
        elif (jd <= 212):
            month = 7
            day = jd - 181
        elif (jd <= 243):
            month = 8
            day = jd - 212
        elif (jd <= 273):
            month = 9
            day = jd - 243
        elif (jd <= 304):
            month = 10
            day = jd - 273
        elif (jd <= 334):
            month = 11
            day = jd - 304
        elif (jd <= 365):
            month = 12
            day = jd - 334
        else:
            print "Not a valid Julian Day"
            sys.exit(2)
    newdate = "%d%02d%02d" % (year, month, day)
    return newdate