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.




var Date=Time.Date;
fcn add12h(dt){
   re:=RegExp(0'|(\w+)\s+(\d+)\s+(\d+)\ +(.+)\s|);
   re.search(dt);
   _,M,D,Y,hms:=re.matched;    //"March","7","2009","7:30pm"
   M=Date.monthNames.index(M); //3
   h,m,s:=Date.parseTime(hms); //19,30,0
   dti:=T(Y,M,D, h,m,s).apply("toInt");
   Y,M,D, h,m,s=Date.addHMS(dti,12);
   "%s %d %d %s".fmt(Date.monthNames[M],D,Y,Date.toAMPMString(h,m));
}