If you're banned for 1 month, and the date this happens is Jan 1, then you'll be unbanned Feb 1.
If you're banned for 4 days and it's the 31st of the month, then you'll be unbanned on the 4th of the next month.
Want to know how many days you have left?
Find how many days have elapsed between now and the time you got banned. Then, find how long your ban duration is using the above method. Subtract them. If you get a negative number, you did it wrong so try again.
If you get 0 days and you're still not unbanned, keep in mind we count hours, minutes, and seconds too, so your ban should be up by the end of the day.
Muted? Just replace "ban" by "mute".