Traditional Culture Encyclopedia - The 24 Solar Terms - Calendar programming code of java program?
Calendar programming code of java program?
calendar calendar = calendar . getinstance();
Calendar.set (calendar. Year 2065438+02);
Calendar.set (calendar. Month,1);
Calendar.set (calendar. Month/day,1);
int first = calendar.get(Calendar。 Day of the week)-1;
System. out . println(calendar . get(calendar . year)+" year "
+(calendar.get (calendar.month)+1)+"calendar");
system . out . println(" Day \ t 1 \ T2 \ T3 \ T4 \ t5 \ T6 ");
for(int I = 0; I'm < first; i++) {
system . out . print(" \ t ");
}
int maxDay = Calendar . getactualmaximum(Calendar。 Month day);
for(int I = 0; I & ltmaxdayi++)
if (first / 7 == 1) {
first = 0;
system . out . println();
}
System.out.print(i + 1
+(first/6 = = 1 | | I = = maxDay- 1? " ":" \ t "));
The first++;
}
}
- Previous article:Moxibustion time in dog days in 2022
- Next article:What is the reason why the pressure reducing valve of turbocharger makes noise?
- Related articles
- What brand of Odyssey accelerator is used?
- How about shock entrepreneurship? Is it suitable for starting a business?
- One more, haha: count nine couplets for nine days in cold weather.
- What is the temperature difference between north and south in China?
- What are the taboos of the Millennium solar terms diet?
- It feels good in summer. Talk about the mood suitable for summer hair.
- Should I use 5053 to open the throttle valve after washing 2.0?
- Enjoy a spring rain and a cup of tea.
- How long does it take to cook sausages?
- "Spring thunder, everything is long" is to describe which solar term?