2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -1,13 +1,16 @@
/*REXX pgm to add 12 hours to a date & time, showing the before & after.*/
aDate = 'March 7 2009 7:30pm EST'
parse var aDate mon dd yyyy hhmm tz . /*obtain the various parts&pieces*/
mins = time('M',hhmm,'C') /*get the # minutes past midnight*/
mins = mins + (12*60) /*add twelve hours to timestamp. */
nMins = mins // 1440 /*compute #min into same/next day*/
days = mins % 1440 /*compute number of days "added".*/
aBdays = date('B',dd left(mon,3) yyyy) /*# of base days since REXX epoch*/
nBdays = aBdays + days /*now, add the # of days "added".*/
nDate = date(,nBdays,'B') /*calculate the new date (maybe).*/
nTime = time('C',nMins,'M') /* " " " time " */
say aDate ' + 12 hours ' ndate ntime tz /*display new timestamp.*/
/*stick a fork in it, we're done.*/
/*REXX program adds 12 hours to a given date and time, displaying the before and after.*/
aDate = 'March 7 2009 7:30pm EST' /*the original or base date to be used.*/
parse var aDate mon dd yyyy hhmm tz . /*obtain the various parts and pieces. */
mins = time('M', hhmm, "C") /*get the number minutes past midnight.*/
mins = mins + (12*60) /*add twelve hours to the timestamp.*/
nMins = mins // 1440 /*compute number min into same/next day*/
days = mins % 1440 /*compute number of days added to dats.*/
aBdays = date('B', dd left(mon,3) yyyy) /*number of base days since REXX epoch.*/
nBdays = aBdays + days /*now, add the number of days added. */
nDate = date(,nBdays, 'B') /*calculate the new date (maybe). */
nTime = time('C', nMins, "M") /* " " " time " */
say aDate ' + 12 hours ' ndate ntime tz /*display the new timestamp to console.*/
/*stick a fork in it, we're all done. */