Task

Given the date string "March 7 2009 7:30pm EST", 

output the time 12 hours later in any human-readable format.

As extra credit, display the resulting time in a time zone different from your own.




 
   CHARACTER date="March 7 2009 7:30pm EST", am_pm, result*20
 
   EDIT(Text=date, Parse=cMonth, GetPosition=next)
   month = 1 + EDIT(Text='January,February,March,April,May,June,July,August,September,October,November,December', Right=cMonth, Count=',' )
   READ(Text=date(next:)) day, year, hour, minute, am_pm
   hour = hour + 12*(am_pm == 'p')
   TIME(MOnth=month, Day=day, Year=year, Hour=hour, MInute=minute, TO, Excel=xls_day)
   WRITE(Text=result, Format="UWWW CCYY-MM-DD HH:mm") xls_day + 0.5
                   ! result = "Sun 2009-03-08 07:30"
 END
 