mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
If a Calendar changes values, update the (cached) fields.
This commit is contained in:
parent
8902cf2a73
commit
7eb08c5fc4
@ -76,6 +76,11 @@ public abstract class Calendar {
|
||||
parseIntoFields(time);
|
||||
}
|
||||
|
||||
public void setTime(Date date) {
|
||||
super.setTime(date);
|
||||
parseIntoFields(this.time);
|
||||
}
|
||||
|
||||
private static boolean isLeapYear(int year) {
|
||||
return (year%4 == 0) && (year%100 != 0) || (year%400 == 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user