@marangeo,
I think you're on the right track, and you could potentially create fewer formulas (although they would be more complicated) by combining the formulas for all of the months with 30 days (April, June, September and November) and combining the formulas for all of the months with 31 days (January, March, May, July, August, October and December).
Possibly something like this -
=IF(AND(D4>31,E4="APRIL", "JUNE","SEPTEMBER","NOVEMBER"),"30 DAYS","")
I'm not certain how the conditional works. In Excel, it would include wrapping the original statement in an OR statement.
Or would you need to create a short separate list of 30-day and 31-day months and then have the formula reference the list? I am unsure as I haven't used Works in a long, long time, but it might work to have the months in lists and then reference them that way, and the February issue could potentially be solved in a similar fashion, with lists of leap years giving you your times when the exception would kick in (e. g. just list 1996, 2000, 2004, 2008, 2012, 2016, etc. as you need them, or possibly even an anchor year - maybe 2000 and then also include a year formula whereby the exception only kicks in if the year, if subtracted from the anchor year, gives you a difference that is a multiple of 4).