I'm new to macros in Google sheets and new in all Javascript macros in fact. I have written part of the macro to set the tab name for the current week:
Spreadsheet.getActiveSheet().setName(Utilities.formatDate(new Date(), 'GMT', 'w')
It is properly working however I need to have tabs for weeks ahead it means we have current Week 40 and I need to have tab name week 42. If I put +2 it gives 402, not 42. Can anyone help me?