To simplify the problem, lets say I have variable:
dat="10152015" (representing 15th October 2015)
the result for
dat should be
Note that I am not using today's date.
What I have problem with is thinking of a way to decrement the date by 1 day. I could just decrement the 4th digit, but this is a calendar.
My current thinking is to convert this into a format that unix understands (whatever that is), then try working from there, and then convert the answer back