×

Loading...

I came across this post in chinasmile. Nobody has answered his question yet. I couldn't figure out a way to do it with shell scripts, although

I know it's pretty easy to write a simple C program by using mktime() function and a simple parser to parse the argument into tm structure. But the guy obviously was asking for solutions in script languages, does anybody have any idea? I am really interested.
####################but here############################
Thanks.
I need a working shell scripts to calculate the days between two calendar dates, the input should be in the format of "YYYYMMDD" for the date string, and I need to know how many days between a given date and the current day's date, OR any two given dates.

I know it may sound easy, just don't have time to code and test it my own. Does anybody know if there are already some successfully tested running scripts for this somewhere, OR can you kindly help me on this? Any shell (B,K,C) is okay.

Thanks in advance.
Report