He keeps cancelling on me?

Lately, my boyfriend has been cancelling on me. Whenever we make plans to hang out, he seems all for it and then cancells on me the day before or the day of. On the occassion that we actually do hang out, he seems distracted and cuts it short. He will either ask if I am okay with him hanging out with his friends a couple hours into hanging out or he will give some excuse about how I should go home because he doesn't think it's a good idea for me to stay much longer if I work the next day or if I have plans with family. Before we used to hang out 2-3 times a week for 5-6 hours. Lately, we hang out once every week, sometimes two weeks for 2-3 hours.Why is he doing this?Does he just not want to hang out, but doesn't want to tell me that?