So i have a really complex system i wrote for my teacher it does a bunch of math that he had in a spreadsheet that finds out basically how long it takes someone to save up enough money to cover an asset of there. Long story short i currently have it saying for example "You will receive enough money to cover this asset in 0.38 months"
I would like to be as user friendly as possible, i dont care if i have to come up with a math function for each month. My question is, how would i spit out 0.39 Month
to Weeks
and Possibly if i can Days
(which would actually make more sense because i can make a script that says if greater then 7 then that is equal to 1 week) to make it even more precise. I know for starters i need to know how many days are in each month, not every month is the same as we all know. Any starting point after that would be great. Im jQuery/JS for this math functions to this application.