|  |  |  | 
|---|
|  |  |  | package com.matrix.system.hive.plugin.util; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.matrix.core.tools.DateUtil; | 
|---|
|  |  |  | import com.matrix.core.tools.StringUtils; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | 
|---|
|  |  |  | Calendar c = Calendar.getInstance(); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | int dataInt = StringUtils.stringToInt(data); | 
|---|
|  |  |  | int month = DateUtils.getMonth(createTime); | 
|---|
|  |  |  | int year = DateUtils.getYear(createTime); | 
|---|
|  |  |  | int month = DateUtil.getMonth(createTime); | 
|---|
|  |  |  | int year = DateUtil.getYear(createTime); | 
|---|
|  |  |  | if (dataInt > 12 - month && dataInt < 12) { | 
|---|
|  |  |  | month += dataInt; | 
|---|
|  |  |  | year += 1; | 
|---|
|  |  |  | 
|---|
|  |  |  | String checkrule = "1"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Date resultDate = TimeUtils.getEndYearTime(data, checkrule); | 
|---|
|  |  |  | String time = DateUtils.dateToString(resultDate, DateUtils.DATE_FORMAT_SS); | 
|---|
|  |  |  | String time = DateUtil.dateToString(resultDate, DateUtil.DATE_FORMAT_SS); | 
|---|
|  |  |  | System.out.println(time); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|