fix format

This commit is contained in:
Looly 2024-04-24 13:38:48 +08:00
parent 743ff04dcf
commit 2fbb0f469c
2 changed files with 83 additions and 78 deletions

View File

@ -116,7 +116,7 @@ public class SolarTerms {
*
* @param y 公历年(1900-2100)
* @param n 二十四节气中的第几个节气(1~24)从n=1(小寒)算起
* @return getTerm(1987,3) -4;意即1987年2月4日立春
* @return getTerm(1987, 3) -4;意即1987年2月4日立春
*/
public static int getTerm(final int y, final int n) {
if (y < 1900 || y > 2100) {
@ -143,6 +143,7 @@ public class SolarTerms {
/**
* 根据日期获取节气
*
* @param date 日期
* @return 返回指定日期所处的节气若不是一个节气则返回空字符串
*/
@ -154,6 +155,7 @@ public class SolarTerms {
/**
* 根据农历日期获取节气
*
* @param chineseDate 农历日期
* @return 返回指定农历日期所处的节气若不是一个节气则返回空字符串
*/
@ -163,6 +165,7 @@ public class SolarTerms {
/**
* 根据日期获取节气
*
* @param date 日期
* @return 返回指定日期所处的节气若不是一个节气则返回空字符串
*/
@ -172,6 +175,7 @@ public class SolarTerms {
/**
* 根据年月日获取节气
*
* @param year 公历年
* @param mouth 公历月从1开始
* @param day 公历日从1开始
@ -183,6 +187,7 @@ public class SolarTerms {
/**
* 根据年月日获取节气, 内部方法不对月和日做有效校验
*
* @param year 公历年
* @param mouth 公历月从1开始
* @param day 公历日从1开始

View File

@ -19,7 +19,7 @@ import org.junit.jupiter.api.Test;
public class SolarTermsTest {
@Test
public void getTermTest1(){
public void getTermTest1() {
final int term = SolarTerms.getTerm(1987, 3);
Assertions.assertEquals(4, term);
}