I have two dates that are unix timestamps, and I would need to find out if the dates match the same month. For example, if I have 1393624800 = 02 / 28 / 14and 1391472000 = 2 / 4 / 2014. I decided that I could convert the unix timestamps to a format, for example 28-02-2014, and extract the month, but I feel like a kind of dirty method. What is the best way to do this?
EDIT: Sry, I forgot. You also need to make sure that same year.
source
share