正在显示
1 个修改的文件
包含
18 行增加
和
0 行删除
@@ -523,4 +523,22 @@ public final class DateUtil { | @@ -523,4 +523,22 @@ public final class DateUtil { | ||
523 | return format.format(date); | 523 | return format.format(date); |
524 | 524 | ||
525 | } | 525 | } |
526 | + | ||
527 | + /** | ||
528 | + * 传入时间+15分钟 | ||
529 | + * @param date | ||
530 | + * @return | ||
531 | + * @throws ParseException | ||
532 | + */ | ||
533 | + public Date dateTimeAddfifteen(Date date) throws ParseException { | ||
534 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
535 | + | ||
536 | + Calendar nowTime = Calendar.getInstance(); | ||
537 | + | ||
538 | + nowTime.setTime(date); | ||
539 | + nowTime.add(Calendar.MINUTE, 15); | ||
540 | + Date time = nowTime.getTime(); | ||
541 | + | ||
542 | + return time; | ||
543 | + } | ||
526 | } | 544 | } |
-
请 注册 或 登录 后发表评论