This one is a tricky one.
If the basketball is in the air, after hitting the ground, and time expires, you do not have a legal shot. Only an airborne try or tap for a goal after time expires extends a quarter. If you look at the def. of a try or tap you will see that this does not enter into either category. Therefore the ball is dead in the air when time expires if it is not from a try or tap. If it went in before time expired it would be 2 points awarded to that team (as a footnote). I remember seeing this one in a casebook, it used the example of a ball bouncing off a shoulder, it has the same principles I believe, as coming off the ground.
this is IMO and interpretation, I am prepared to see it ripped apart, hopefully with sitations