free memory in shell-lib
rename months_in_year function to days_in_month
make format_calendar_date use only the memory it needs