0.0.6:修改了农历生日计算的错误

This commit is contained in:
bamanker
2023-01-01 12:24:36 +08:00
parent 092c289cf5
commit 345bc61d1a
3 changed files with 3 additions and 3 deletions

View File

@@ -10,7 +10,7 @@
</parent>
<groupId>com.bamanker</groupId>
<artifactId>dailyLove</artifactId>
<version>0.0.5</version>
<version>0.0.6</version>
<name>dailyLove</name>
<description>dailyLove</description>
<properties>

View File

@@ -48,7 +48,7 @@ public class PushDailyController {
param1.setCity(DailyLoveConfigure.City_ID);
param1.setType("7");
String weatherResp = dataRemoteClient.getWeather(param1);
JSONObject weatherJson = JSONObject.parseObject(weatherResp).getJSONArray("result").getJSONObject(0).getJSONArray("list").getJSONObject(2);
JSONObject weatherJson = JSONObject.parseObject(weatherResp).getJSONArray("result").getJSONObject(0).getJSONArray("list").getJSONObject(1);
String city = JSONObject.parseObject(weatherResp).getJSONArray("result").getJSONObject(0).getString("area");
Weather weather = weatherJson.toJavaObject(Weather.class);

View File

@@ -53,7 +53,7 @@ class DailyLoveApplicationTests {
Calendar dateToday = Calendar.getInstance();
int todayYear = dateToday.get(Calendar.YEAR);
//把生日的年改为今年,方便计算
ChineseDate chineseDate = new ChineseDate(todayYear, chineseMonth, chineseDay);
ChineseDate chineseDate = new ChineseDate(todayYear, chineseMonth, chineseDay,false);
//农历日期对应的阳历日期
int gregorianDay = chineseDate.getGregorianDay();
//计算时间差