How to get a list of available calendar times?

Hi there! I’ve been trying to figure this out for days now.

I am try to come up with some solution so that I can get a list of all my available calendar times between 9am and 6pm for a given day. Ideally, I’d like to be able to type in a textexpander shortcut of ;availabletimes and have it expand to a list like the below:

Thursday, Oct 1st
9:30-12pm
3:30-4pm
5-6pm

Does anyone know a way to do this? I’m open to using AppleScript, Keyboard Maestro, TextExpander or anything else!