Short answer. Yes. Article 1197 lets a court fix a deadline where an obligation sets no period but a period was clearly intended, and specifically where repayment depends on the debtor's own will, as with a promise to pay when able. The court sets the date it believes the parties probably contemplated, and that date cannot later be changed.
What the law says
The courts shall also fix the duration of the period when it depends upon the will of the debtor. In every case, the courts shall determine such period as may under the circumstances have been probably contemplated by the parties. Once fixed by the courts, the period cannot be changed by them.
Civil Code, Article 1197 — When the Court Fixes the Period. Read the full provision →
Why a promise to pay when able still needs a court-fixed date
A promise to pay when able is not the same as a promise with no deadline at all. The parties plainly intended repayment to happen at some point; they simply left the exact date open and tied it to the debtor's own capacity. Article 1197 addresses exactly this: where a period was clearly intended by the circumstances, or where the timing depends on the will of the debtor, the courts step in and fix the duration, rather than leaving the creditor to wait indefinitely or the debtor free to decide never to pay.
How a court decides what date to set
The law does not let a court pick an arbitrary date. Article 1197 instructs the court to determine such period as may, under the circumstances, have been probably contemplated by the parties. That means the court looks at the nature of the debt, the relationship between the parties, and whatever facts suggest what a reasonable deadline would have been when the promise was made, rather than simply whatever the creditor now prefers or however urgently repayment is wanted.
Once the court sets it, it is final
Article 1197 is explicit that once a period is fixed by the courts, that period cannot be changed by them. This finality is meant to give both sides certainty: the debtor knows exactly when payment falls due, and the creditor knows exactly when the debt becomes demandable and, ultimately, enforceable through collection. Asking a court to fix the period is typically a separate step that has to happen before the obligation can be treated as due and pursued for non-payment.
What this means for your cousin's debt
In practice, this means you cannot simply declare a deadline yourself and treat the debt as overdue the moment it passes. Because the obligation depends on your cousin's own will as to timing, Article 1197 requires the additional step of having a court fix the period before the debt becomes legally demandable on a fixed date. Until that happens, the obligation exists and is owed, but it is not yet due in the way a debt with a stated deadline would be, which affects when you can pursue collection for non-payment.