2 % convert geotime string yyjjjhhmmss to date string
3 dayspermonth = [0 31 28 31 30 31 30 31 31 30 31 30 31];
5 dayofyear=str2num(s(3:5));
7 minutes=str2num(s(8:9));
8 seconds=str2num(s(10:11));
9 if mod(year,4)==0 & mod(year,100) ~=0,
10 dayspermonth(2)=29; % leap year
12 c = cumsum(dayspermonth);
13 idx=find(dayofyear<=c);
15 error('bad day of the year')
18 dayofmonth = dayofyear - c(month);
19 d = datestr([year+2000,month,dayofmonth,hours,minutes,seconds]);