This commit is contained in:
Looly
2020-05-30 07:41:50 +08:00
parent fce8c35a82
commit 4a302fc2d8
4 changed files with 25 additions and 13 deletions

View File

@@ -252,16 +252,14 @@ public class DateUtil extends CalendarUtil {
}
/**
* 获得指定日期是这个日期所在月份的第几天<br>
* 获得指定日期是这个日期所在的第几天
*
* @param date 日期
* @return 天
* issue#896@Github
* @since 5.3.6
*/
public static int dayOfYear(Date date) {
Calendar instance = Calendar.getInstance();
instance.setTime(date);
return instance.get(Calendar.DAY_OF_YEAR);
return DateTime.of(date).getField(DateField.DAY_OF_YEAR);
}
/**

View File

@@ -350,12 +350,23 @@ public class StrUtil {
*
* @param args 被检查的对象,一个或者多个
* @return 是否都不为空
* @since 5.3.5
* @since 5.3.6
*/
public static boolean isAllNotEmpty(CharSequence... args) {
return false == hasEmpty(args);
}
/**
* 是否存都不为{@code null}或空对象或空白符的对象,通过{@link StrUtil#hasBlank(CharSequence...)} 判断元素
*
* @param args 被检查的对象,一个或者多个
* @return 是否都不为空
* @since 5.3.6
*/
public static boolean isAllNotBlank(CharSequence... args) {
return false == hasBlank(args);
}
/**
* 检查字符串是否为null、“null”、“undefined”
*