Skip to content

Commit 3c01547

Browse files
committed
晚上DateUtils
1 parent 9b54db7 commit 3c01547

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/com/JUtils/base/DateUtils.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,12 @@ public static int compareDate(String startDay,String endDay,int stype) throws Ex
706706
startDay = formatDate(startDay, "yyyy-MM-dd");
707707
endDay = formatDate(endDay, "yyyy-MM-dd");
708708

709-
String formatStyle = stype==1?"yyyy-MM":"yyyy-MM-dd";
709+
String formatStyle = "yyyy-MM-dd";
710+
if("1".equals(stype)){
711+
formatStyle = "yyyy-MM";
712+
}else if("2".equals(stype)){
713+
formatStyle = "yyyy";
714+
}
710715

711716
endDay = endDay==null ? getCurrentTime("yyyy-MM-dd") : endDay;
712717

0 commit comments

Comments
 (0)