Commit 80bfc58fef1d9eeaa379aa2372b5c09d7ffd97cc
1 parent
a4e2b4c2b9
Exists in
master
and in
8 other branches
儿童检查
Showing 1 changed file with 5 additions and 5 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
80bfc58
| ... | ... | @@ -479,7 +479,7 @@ |
| 479 | 479 | c2.setTime(date2); |
| 480 | 480 | |
| 481 | 481 | result = c2.get(Calendar.MONDAY) - c1.get(Calendar.MONTH); |
| 482 | - if (result < 0) | |
| 482 | + if (result <= 0) | |
| 483 | 483 | { |
| 484 | 484 | result = 12 - Math.abs(result); |
| 485 | 485 | } |
| 486 | 486 | |
| ... | ... | @@ -651,11 +651,11 @@ |
| 651 | 651 | // String st = md.format(new Date()); |
| 652 | 652 | // System.out.print(st); |
| 653 | 653 | |
| 654 | -// String s = getBabyMonthAge(parseYMD("2014-07-9"), new Date()); | |
| 655 | -// System.out.println(s); | |
| 654 | + String s = getBabyMonthAge(parseYMD("2015-08-19"), new Date()); | |
| 655 | + System.out.println(s); | |
| 656 | 656 | |
| 657 | - Date s = addDay(parseYMD("2016-02-26"), 168); | |
| 658 | - System.out.println(getyyyy_MM_dd(s)); | |
| 657 | +// Date s = addDay(parseYMD("2016-02-26"), 168); | |
| 658 | +// System.out.println(getyyyy_MM_dd(s)); | |
| 659 | 659 | } catch (Exception e) |
| 660 | 660 | { |
| 661 | 661 |