$ ./eod.pl ln =========== DATE INITIALIZATION =========== It is now 2009-07-08T14:50:09 in LN Today (ln): 07/08/2009 -=- Tomorrow (ln): 07/08/2009 -=- Yesterday (ln): 07/08/2009 -=- Next business day: 07/09/2009 Today (local (NY) ): 07/08/2009 -=- Tomorrow (local (NY) ): 07/09/2009 -=- Yesterday (local (NY) ): 07/07/2009 -=- Next business day (local (NY) ): 07/09/2009 =========== INPUT =========== table_name keyid description COCARRY StoreToDDI DONE COCARRY rundate 7/3/2009 ROLL ignore_local 07/07/2009 ROLL mark DONE 07/03/2009 22:09 ROLL position DONE 07/03/2009 22:08 ROLL rundate 07/03/2009 ROLL spot DONE 07/03/2009 22:08 SPLAdj data DONE Jul 4 2009 12:51AM SPLAdj lastcompdate Jul 3 2009 12:00AM SPLAdj rundate Jul 3 2009 12:00AM SPLbatch data DONE Jul 3 2009 11:55PM SPLbatch lastcompdate Jul 3 2009 12:00AM SPLbatch rundate Jul 3 2009 12:00AM SPLbatchNew data DONE Jul 4 2009 12:50AM SPLbatchNew lastcompdate Jul 3 2009 12:00AM SPLbatchNew rundate Jul 3 2009 12:00AM (16 rows affected) Position has rolled into Jul 6 2009 12:00AM (1 row affected) Spot has rolled into Jul 6 2009 12:00AM (1 row affected) Mark has rolled into Jul 6 2009 12:00AM (1 row affected) =========== AFTER PARSING =========== -- COCARRY StoreToDDI: DONE -- COCARRY rundate: 7/3/2009 -- ROLL mark desc: DONE - 07/03/2009 - 22:09 -- ROLL position: DONE - 07/03/2009 - 22:08 -- ROLL rundate: 07/03/2009 -- ROLL spot desc: DONE - 07/03/2009 - 22:08 -- SPLAdj data desc: DONE - Jul 4 2009 - 12:51 - AM -- SPLAdj lastcompdate desc: Jul 3 2009 - 12:00 - AM -- SPLAdj rundate desc: Jul 3 2009 - 12:00 - AM -- SPLbatch data desc: DONE - Jul 3 2009 - 11:55 - PM -- SPLbatch lastcompdate desc: Jul 3 2009 - 12:00 - AM -- SPLbatch rundate desc: Jul 3 2009 - 12:00 - AM -- SPLbatchNew data desc: DONE - Jul 4 2009 - 12:50 - AM -- SPLbatchNew lastcompdate desc: Jul 3 2009 - 12:00 - AM -- SPLbatchNew rundate desc: Jul 3 2009 - 12:00 - AM -- Position rolled into: Jul 6 2009 12:00AM -- Spot rolled into: Jul 6 2009 12:00AM -- Mark rolled into: Jul 6 2009 12:00AM =========== DATE NORMALIZATION =========== Fixing COCARRY rundate (7/3/2009) -=- epoch: 1246579200 -=- human: 07/03/2009 Fixing SPLAdj data desc (Jul 4 2009 12:51 AM) -=- epoch: 1246668660 -=- human: 07/04/2009 Fixing SPLAdj lastcompdate desc (Jul 3 2009 12:00 AM) -=- epoch: 1246579200 -=- human: 07/03/2009 Fixing SPLAdj rundate desc (Jul 3 2009 12:00 AM) -=- epoch: 1246579200 -=- human: 07/03/2009 Fixing SPLbatch data desc (Jul 3 2009 11:55 PM) -=- epoch: 1246665300 -=- human: 07/03/2009 Fixing SPLbatch lastcompdate desc (Jul 3 2009 12:00 AM) -=- epoch: 1246579200 -=- human: 07/03/2009 Fixing SPLbatch rundate desc (Jul 3 2009 12:00 AM) -=- epoch: 1246579200 -=- human: 07/03/2009 Fixing SPLbatchNew data desc (Jul 4 2009 12:50 AM) -=- epoch: 1246668600 -=- human: 07/04/2009 Fixing SPLbatchNew lastcompdate desc (Jul 3 2009 12:00 AM) -=- epoch: 1246579200 -=- human: 07/03/2009 Fixing SPLbatchNew rundate desc (Jul 3 2009 12:00 AM) -=- epoch: 1246579200 -=- human: 07/03/2009 Fixing position (Jul 6 2009 12:00AM) -=- epoch: 1246838400 -=- human: 07/06/2009 Fixing spot (Jul 6 2009 12:00AM) -=- epoch: 1246838400 -=- human: 07/06/2009 Fixing mark (Jul 6 2009 12:00AM) -=- epoch: 1246838400 -=- human: 07/06/2009 ============= DOING THE NEEDFUL ;) ============= "COCARRY StoreToDDI" - DONE? yes. Great! "COCARRY rundate" - is 07/03/2009 todays business day for that region? no. This is a problem. "ROLL mark" - DONE on 07/08/2009? no. This is a problem. "ROLL position" - DONE on 07/08/2009? no. This is a problem. "ROLL spot" - DONE on 07/08/2009? no. This is a problem. "ROLL rundate" - is 07/03/2009 todays business day for that region? no. This is a problem. "Position has rolled into" - is 07/06/2009 a non-holiday, non-weekend today's datestamp for that region? no. This is a problem. Next business day for ln is 07/07/2009 "Spot has rolled into" - is 07/06/2009 a non-holiday, non-weekend today's datestamp for that region? no. This is a problem. Next business day for ln is 07/07/2009 "Mark has rolled into" - is 07/06/2009 a non-holiday, non-weekend today's datestamp for that region? no. This is a problem. Next business day for ln is 07/07/2009 "SPLbatch data" - is 07/03/2009 todays business day for that region? (in DONE state) ? no. This is a problem. It should be 07/08/2009 - DONE "SPLbatch lastcompdate" - is 07/03/2009 todays business day for that region (in DONE state) ? no. This is a problem. It should be 07/08/2009. "SPLbatch rundate" - is 07/03/2009 todays business day for that region ? no. This is a problem. It should be 07/08/2009. "SPLbatchNew data" - is 07/04/2009 todays business day for that region (in DONE state) ? no. This is a problem. It should be 07/08/2009 - DONE "SPLbatchNew lastcompdate" - is 07/03/2009 todays business day for that region? no. This is a problem. It should be 07/08/2009 "SPLbatchNew rundate" - is 07/03/2009 todays business day for that region? no. This is a problem. It should be 07/08/2009 $