MCPcopy Create free account
hub / github.com/6tail/lunar-java / nextYear

Method nextYear

src/main/java/com/nlf/calendar/Solar.java:729–745  ·  view source on GitHub ↗

年推移 @param years 年数 @return 阳历

(int years)

Source from the content-addressed store, hash-verified

727 * @return 阳历
728 */
729 public Solar nextYear(int years) {
730 int y = year + years;
731 int m = month;
732 int d = day;
733 if (1582 == y && 10 == m) {
734 if (d > 4 && d < 15) {
735 d += 10;
736 }
737 } else if (2 == m) {
738 if (d > 28) {
739 if (!SolarUtil.isLeapYear(y)) {
740 d = 28;
741 }
742 }
743 }
744 return fromYmdHms(y, m, d, hour, minute, second);
745 }
746
747 /**
748 * 月推移

Callers 2

test29Method · 0.95
getStartSolarMethod · 0.95

Calls 2

isLeapYearMethod · 0.95
fromYmdHmsMethod · 0.95

Tested by 1

test29Method · 0.76