With those dimensions, it's roughly 44.8831.... US gallons. Multiply the dimensions in inches and divide by 231 to get US gallons.
However, to be more exact, you'll want to measure the inside dimensions, and take into account that the water will not be 24" deep (top to bottom) due to the fact that you'll probably have a couple inches of gravel in the bottom, and it won't be filled to the brim.
If your friend lives in New York, chances are very good that it is an All Glass Aquarium and if he bought it at Petland Discounts it almost certainly is. BTW, that's the place I found the best bargains on tanks. Their 55 gallon tank and stand for $89.00 is a good deal. Their prices for accessories and food are high, however.
The exact number of gallons is not important. If you've got a 30 gallon tank but actually measures out to 27 gallons, it won't be a problem unless you're intending to literally stock up to 30 gallons of fish which can still be done, though it would be slightly cramped.
IMO, as long as you're within 3 gallons of the size, you're okay.