bash
e GNU date
#grab today's date in YYYYMMDD format
today=$(date +%Y%m%d)
#grab date as of 3 months ago in YYYYMMDD format
three_months_ago=$(date +%Y%m%d --date='3 months ago')
#now convert dates to "seconds since epoch" format, and then divide the difference by 60*60*24 to convert from seconds to days
printf '%d\n' $(( ($(date --date=$today +%s) - \
$(date --date=$three_months_ago +%s))/(60*60*24) ))
91