I was busy with writing a shell script on my Linux machine to generate screenshots for liveuamap.com. I needed a way to get the amount of days in a specific month for a specific date. After long search I found ways to do it, one way was to use cal
(cal 5 2015 | awk 'NF {DAYS = (cal 5 2015 | awk 'NF {DAYS = daysAmount
Many thanks to Milosz Galazka who has answered my question. Here is a link to his article
https://blog.sleeplessbeastie.eu/2013/03/24/how-to-get-number-of-days-in-a-month-using-shell-commands/