1. sorrow.ex

-- sorrow.ex 
include std/datetime.e 
include std/console.e 
global function DaysBetweenDates(datetime dt1, datetime dt2)                
return floor(diff(dt1,dt2)/86400)-- 86400 = seconds in a day            
end function                                            
    dt1 = {2017,1,20,0,0,0}, 
    dt2 = now(), 
    dt3 = {2021,1,20,0,0,0} 
puts(1, "\n\n\tAn old man sleeps with his conscience at night"& 
"\n\tYoung kids sleep with their dreams"& 
"\n\tWhile the mentally ill sit perfectly still"& 
"\n\tAnd live through life's in-betweens ... John Prine\n\n") 
printf(1, "\n\n\tDuration of Sorrow = %d Days,  Penitence Remaining = %d Days\n\n\t",  
            {DaysBetweenDates(dt1, dt2), DaysBetweenDates(dt2, dt3)}) 
new topic     » topic index » view message » categorize


Quick Links

User menu

Not signed in.

Misc Menu