China Naming Network - Almanac query - How to get solar terms java

How to get solar terms java

I have a dos interface here, but it can only be counted as Gregorian calendar.

/**

*

*/

Packaging calendar;

Import java.util.scanner;

/**

* perpetual calendar

*

* @ Author Administrator

*

*/

Public course calendar {

/**

* @param args

*/

Public static void main(String[] args) {

Scanner input = new scanner (system. in);

System.out.print ("Please enter year:");

int year = input . nextint();

System.out.print ("Please enter month:");

int months = input . nextint();

int year num = 0;

int sum = 0;

for(int I = 1900; My< year; I++) {// year

if ((i % 4 == 0) || (i % 100! = 0 & amp& ampi % 400 == 0)) {

sum+= 366;

} Otherwise {

sum+= 365;

}

}

boolean isYear = false

If ((year% 4 == 0) || (year% 100! = 0 & amp& ampyear % 400 == 0)) {

isYear = true

}

for(int I = 1; I < = month; I++) {// month

sum+= yern um;

Switch (i) (

Case 1:

Case 3:

Case 5:

Case 7:

Case 8:

Case 10:

Case 12: {

yrenum = 3 1;

Break;

}

Case 4:

Case 6:

Case 9:

Case 1 1: {

yearNum = 30

Break;

}

Case 2: {

if (isYear) {

yearNum = 29

} Otherwise {

yearNum = 28

}

Break;

}

}

}

String[] week = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" and "Saturday"};

for(int I = 0; I< weeks. Length; i++) {

system . out . print(week[I]+" \ t ");

}

system . out . println();

for(int I = 0; I < total% 7; i++) {

system . out . print(" \ t ");

}

for(int n = 1; N< = yearumn++) {//output

if ((sum + n) % 7 == 1) {

system . out . println();

}

system . out . print(n+" \ t ");

}

}

}