Before entering port for ending a patrol, I open
Data\Cfg\UPC.cfg and edit entry
MinimumsDaysInBaseUS to reflect length of patrol, damage, refits to be done (tower, paint, equipment etc.) or simple fatique (as after heavy lengthy battles).
Normal setting in TMO is 14 days and depending of the above I may go as long as 2 to 3 months in port... this also reflects what I've seen in many war patrol logs...
Nice job!