I´m arguing that Japan has a civilian nuclear capability for many years, and it surely has the means in financial and technical means to achieve a military nuclear capability. So it won´t need that much infrastructure, but, and assuming that nothing, not even feasability studies were ever done (an unlikely assumption, ok), it would surely need more than just 3 months.Same goes to Germany. If every component must be designed and tested inhouse, without using "borrowed" designs, this takes time and money, and its a dificult process. Don´t compare to US or other nuclear powers that have the know-how for 50 years. Or else we would already have dozens and dozens of nuclear capable countries, not to mention ole Northern Kim, that, even with chinese assistance, is getting there very slowly, and not only because of money. Having nuclear grade Uranium is one thing, having a fully operational, and safe weapon is another. Not to mention delivery means, but the Japanese could surely adapt very fast their satelite launchers to achieve ICBM launchers. MIRV might take a little more time.
As for the dirty bomb thing, of course it would still kill many civilians and contaminate heaviliy the immediate target area, but it would be a major flop in military terms, and the risk of retaliation over an almost "dude" bomb is still very big.
.pt