I need to find the number of days between a particular date in the past and today. I can use Time.now() to get a timestamp for today, but how do I get a timestamp for some other day? The exact input format doesn’t matter (it could be a string or three integers for m-d-y, whatever). I couldn’t find a library function for this.
I want something ike this Matlab code:
d1 = datenum ('12-Nov-2013') ; % known date of Type 1 dcur = datenum (date) ; % Today's date ddif = dcur - d1 ; % No. of days between two dates