;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ ;+ ; NAME: ; ; PURPOSE: ; ; CATEGORY: ; ; CALLING SEQUENCE: ; ; INPUTS: ; ; KEYWORD PARAMETERS: ; ; OUTPUTS: ; ; COMMON BLOCKS: ; ; SIDE EFFECTS: ; ; RESTRICTIONS: ; ; EXAMPLE: ; ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) ; ;- ;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ FUNCTION date2string, date ; @common ; s_date = strtrim(date, 2) length = strlen(s_date) sday = strtrim(fix(strmid(s_date,length-2)), 1) smonth = strmid(s_date,length-4, 2) syear = strmid(s_date, 0 ,length-4) ; res = syear+' '+string(format='(C(CMoA0))',31*(fix(smonth)-1))+' ; '+sday if n_elements(langage) EQ 0 then langage = 'gb' case langage of 'gb':BEGIN truc = long(sday) truc = truc-truc/10*10 case truc of 2:truc = 'nd' 3:truc = 'rd' ELSE:truc = 'th' endcase res = string(format='(C(CMoA0))',31*(fix(smonth)-1))+' the '+sday+truc+' '+syear END ELSE:res = sday+' '+string(format='(C(CMoA0))',31*(fix(smonth)-1))+' '+syear endcase return, res end