The principle of calculation should be the same.
Well, CPF says that it works differently when you're transferring your own OA funds to your own SA. And there's some logic behind the different treatment. CPF OA funds are already working for you, already earning interest. It'd be at least "really weird" if you lost a month of interest with such a transfer. Fortunately, you don't.
One interesting "quirk" is that, it seems, you can pick up an extra month of SA interest if you transfer OA funds in the same month when they land in your OA. For example, let's suppose you and your employer deposit $200 on July 25 into your OA (your and your employer's compulsory contribution). Ordinarily that $200 wouldn't earn July interest. But, if you transfer those funds to SA in July, will they earn SA interest for the full month of July? Maybe -- and wouldn't that be nice?
Anyway, given the ways that CPF credits interest, here are the basic "rules of thumb" to optimize CPF and non-CPF interest:
1. Make cash top-ups near the end of the month, to your account and to others' accounts. (But not
exactly at the end of the month. You want to allow enough time for CPF to credit the funds within that same month.)
2. For OA to SA conversions (same individual), try to make your decision and get the conversion done before the end of the month. An online conversion is quick -- the transfer is reflected in your account within a few seconds, typically.
3. For OA to SA/RA transfers (one individual to another), it doesn't really matter too much when you make that transfer, but I would recommend not doing it during the last week of the month. Just to make sure the deduction and the credit both occur in the same calendar month, which is the best you can do.
4. Make any withdrawals on the first day of the calendar month.