I want a script to receive a time in the 24 hour time format HH:mm (e.g. 18:30) and remove 15 minutes from it.

The problem is that if the time inputted was 00:00, then how do I get to 23:45?

I'm sure it's easy if you're in the know.

I can do this with PHP, but not with JS.

I just need the function / basic line of code that does this. I can work out how to call it etc. myself.

Thanks for any help.

John