Suppose I move to the US partway through the year and start working. I will file a dual-status tax return. My employer offers a 401k plan and I want to contribute as much as I am permitted. I understand the maximum employee contribution for 2021 is $19,500.
Despite not being a tax resident (or any other kind of resident) for the full year, am I allowed to contribute the full $19,500 if I want to? Or does this get reduced based on how many days of the year I am a tax resident of the US?
Likewise for the $6,000 IRA limit?