MCPcopy Create free account
hub / github.com/MenoData/Time4J / withMonth

Method withMonth

base/src/main/java/net/time4j/PlainDate.java:1932–1946  ·  view source on GitHub ↗
(int month)

Source from the content-addressed store, hash-verified

1930 }
1931
1932 private PlainDate withMonth(int month) {
1933
1934 if (this.month == month) {
1935 return this;
1936 }
1937
1938 int mlen = GregorianMath.getLengthOfMonth(this.year, month);
1939
1940 return PlainDate.of(
1941 this.year,
1942 month,
1943 Math.min(mlen, this.dayOfMonth)
1944 );
1945
1946 }
1947
1948 private PlainDate withDayOfMonth(int dayOfMonth) {
1949

Callers 2

withValueMethod · 0.45
withValueMethod · 0.45

Calls 3

getLengthOfMonthMethod · 0.95
ofMethod · 0.95
minMethod · 0.45

Tested by

no test coverage detected