(int year)
| 1914 | } |
| 1915 | |
| 1916 | private PlainDate withYear(int year) { |
| 1917 | |
| 1918 | if (this.year == year) { |
| 1919 | return this; |
| 1920 | } |
| 1921 | |
| 1922 | int mlen = GregorianMath.getLengthOfMonth(year, this.month); |
| 1923 | |
| 1924 | return PlainDate.of( |
| 1925 | year, |
| 1926 | this.month, |
| 1927 | Math.min(mlen, this.dayOfMonth) |
| 1928 | ); |
| 1929 | |
| 1930 | } |
| 1931 | |
| 1932 | private PlainDate withMonth(int month) { |
| 1933 |
no test coverage detected