The US Balao-class and Gato-class submarines had enough provisions to stay on patrol for 75 days. Information on other long-range submarines has proved hard to find, although this site mentions British O, P and R class submarines had a range of 20,000 miles.
Were there any submarines of other navies (British, German, Japanese, Russian) which could stay at sea longer than this without being resupplied?
A few related questions:
Were submarines often resupplied at sea by supply ships so that they did not have to go to a port?
What is the most number of days that a submarine remained at sea during WWII without going to a port (i.e. were there cases where subs were resupplied by supply ships several times)?
Did navies during WW2 have regulations as to how many days a submarine could remain at sea without sailors getting shore leave?