[POO] aula05 DateYMD update

This commit is contained in:
TiagoRG 2023-03-21 09:54:14 +00:00
parent d3dccdc72e
commit 3dfc6b9bcd
Signed by untrusted user who does not match committer: TiagoRG
GPG Key ID: DFCD48E3F420DB42
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ public class DateYMD {
} }
public String toString() { public String toString() {
return String.format("%04d-%02d-%02d", year, month, day); return String.format("%04d-%02d-%02d", this.year, this.month, this.day);
} }
static boolean validMonth(int month) { static boolean validMonth(int month) {
return month >= 1 && month <= 12; return month >= 1 && month <= 12;