#+
    # MODIS2CNES : Convert MODIS date format to CNES JULIAN DAYS (YYYYDDD or YYYYDDDHHMM)
    # 
    # @author: Renaud DUSSURGET (LER PAC/IFREMER)
    # @history: Created by RD on 29/10/2012
    #
    #-

def modis2cnes(modis_date):
    """
    #+
    # MODIS2CNES : Convert MODIS date format to CNES JULIAN DAYS (YYYYDDD or YYYYDDDHHMM)
    # 
    # @author: Renaud DUSSURGET (LER PAC/IFREMER)
    # @history: Created by RD on 29/10/2012
    #
    #-
    """

    if not isinstance(modis_date,list) : modis_date=[modis_date]

    if len(modis_date[0]) ==  7 :
        obj=[datetime.datetime.strptime(d,"%Y%j") for d in modis_date] 
    else :
        obj=[datetime.datetime.strptime(d,"%Y%j%H%M") for d in modis_date]
    
#    str,obj=cnes_convert(modis_date)
    dat=[o.strftime("%d/%m/%Y-%H:%M") for o in obj]
    
    return cnes_convert(dat)