Well, I personally can attest that few months in the world of the "Inactive Ships Maintenance Facility" world is more that enough.
Those mothballed ships did serve a purpose, though, and some were recalled to active duty for Vietnam. Some battleships made to Desert Storm.
But this is film is about the "modern" missile Navy of the early 1960's - and not the older ships tied up alongside the piers in the opening sequence. Enjoy!