In Japan, a divisional application can be filed at any time before receiving a first Office Action.
After the issuance of a first Office Action, you can file a divisional application before the expiration of a due date for filing a response to the outstanding Office Action.
Because you can generally obtain a three-month extension of time for filing a response to the outstanding Office Action, the deadline for filing a divisional application in response to the Office Action will also be extended if you can obtain an extension of time for filing a response.
As explained above, the deadline for filing a divisional application is linked to the deadline for filing a response to the Office Action at the Examination stage.
At the stage of receiving a Notice of Allowance, the Japan Patent Office (JPO) gives you a 30-day period for filing a divisional application (which period can be extended for 30 days by filing a request for extension of time).
If you receive a Decision of Rejection, the JPO gives you a four-month period (non-extendable) for filing a divisional application or filing an appeal.
In the case of filing an appeal against the Decision of Rejection, you can file a divisional application along with an appeal (of before the filing of an appeal).