提交 6a57c517 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Move common code out of if-else blocks in getMillis()

上级 8f6a5b14
...@@ -530,8 +530,6 @@ public class DateTimeUtils { ...@@ -530,8 +530,6 @@ public class DateTimeUtils {
if (hour < 0 || hour > 23) { if (hour < 0 || hour > 23) {
throw e; throw e;
} }
return getTimeTry(true, tz, year, month, day, hour, minute,
second, millis);
} else if (message.indexOf("DAY_OF_MONTH") > 0) { } else if (message.indexOf("DAY_OF_MONTH") > 0) {
int maxDay; int maxDay;
if (month == 2) { if (month == 2) {
...@@ -546,12 +544,9 @@ public class DateTimeUtils { ...@@ -546,12 +544,9 @@ public class DateTimeUtils {
// using the timezone Brasilia and others, // using the timezone Brasilia and others,
// for example for 2042-10-12 00:00:00. // for example for 2042-10-12 00:00:00.
hour += 6; hour += 6;
}
return getTimeTry(true, tz, year, month, day, hour, minute, return getTimeTry(true, tz, year, month, day, hour, minute,
second, millis); second, millis);
} else {
return getTimeTry(true, tz, year, month, day, hour, minute,
second, millis);
}
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论