|
@@ -103,7 +103,7 @@ public class TrafPrcsTime {
|
|
cal.setTime(paramDt);
|
|
cal.setTime(paramDt);
|
|
return new SimpleDateFormat(paramFmt).format(cal.getTime());
|
|
return new SimpleDateFormat(paramFmt).format(cal.getTime());
|
|
}
|
|
}
|
|
- public String getCurrFiveMinString(Date paramDt) {
|
|
|
|
|
|
+ public String getCurr05MinString(Date paramDt) {
|
|
Calendar cal = Calendar.getInstance();
|
|
Calendar cal = Calendar.getInstance();
|
|
cal.setTime(paramDt);
|
|
cal.setTime(paramDt);
|
|
cal.set(Calendar.SECOND, 0);
|
|
cal.set(Calendar.SECOND, 0);
|
|
@@ -112,6 +112,15 @@ public class TrafPrcsTime {
|
|
cal.add(Calendar.MINUTE, -(min % 5));
|
|
cal.add(Calendar.MINUTE, -(min % 5));
|
|
return new SimpleDateFormat("yyyyMMddHHmmss").format(cal.getTime());
|
|
return new SimpleDateFormat("yyyyMMddHHmmss").format(cal.getTime());
|
|
}
|
|
}
|
|
|
|
+ public String getCurr15MinString(Date paramDt) {
|
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
|
+ cal.setTime(paramDt);
|
|
|
|
+ cal.set(Calendar.SECOND, 0);
|
|
|
|
+ cal.set(Calendar.MILLISECOND, 0);
|
|
|
|
+ int min = cal.get(Calendar.MINUTE);
|
|
|
|
+ cal.add(Calendar.MINUTE, -(min % 15));
|
|
|
|
+ return new SimpleDateFormat("yyyyMMddHHmmss").format(cal.getTime());
|
|
|
|
+ }
|
|
|
|
|
|
public String calDate(String paramTm, int addSec/*초단위*/) {
|
|
public String calDate(String paramTm, int addSec/*초단위*/) {
|
|
String result = paramTm;
|
|
String result = paramTm;
|
|
@@ -212,12 +221,13 @@ public class TrafPrcsTime {
|
|
* 시간대 계산은 아직 안함(추후 시간대 계산이 필요하면 여기서 하면 됨)
|
|
* 시간대 계산은 아직 안함(추후 시간대 계산이 필요하면 여기서 하면 됨)
|
|
*/
|
|
*/
|
|
this.currTime = getCurrentTimeString(); /* 20170718153504 - 현재시각 */
|
|
this.currTime = getCurrentTimeString(); /* 20170718153504 - 현재시각 */
|
|
- this.currFiveMin = getCurrFiveMinString(convertString2Date(this.currTime)); /* 20170718153500 */
|
|
|
|
|
|
+ this.currFiveMin = getCurr05MinString(convertString2Date(this.currTime)); /* 20170718153500 */
|
|
this.prevFiveMin = calDate(this.currFiveMin, -60*5); /* 20170718153000 - 이전 정주기 5분 시각 */
|
|
this.prevFiveMin = calDate(this.currFiveMin, -60*5); /* 20170718153000 - 이전 정주기 5분 시각 */
|
|
|
|
|
|
String beforeOneWeek = calDate(this.currTime, -60*60*24*7); /* 7일전 */
|
|
String beforeOneWeek = calDate(this.currTime, -60*60*24*7); /* 7일전 */
|
|
- this.ptrn05M = getCurrFiveMinString(convertString2Date(beforeOneWeek)); /* 7일전 정주기 05분 패턴 시각 */
|
|
|
|
- this.ptrn15M = calDate(this.ptrn05M, -60*15); /* 7일전 정주기 15분 패턴 시각 */
|
|
|
|
|
|
+ this.ptrn05M = getCurr05MinString(convertString2Date(beforeOneWeek)); /* 7일전 정주기 05분 패턴 시각 */
|
|
|
|
+ //this.ptrn15M = calDate(this.ptrn05M, -60*15); /* 7일전 정주기 15분 패턴 시각 */
|
|
|
|
+ this.ptrn15M = getCurr15MinString(convertString2Date(this.ptrn05M)); /* 7일전 정주기 15분 패턴 시각 */
|
|
|
|
|
|
this.prcsFiveMin = this.prevFiveMin; /* 20170718153000 - 이전 정주기 5분 시각 이용하여 입력 */
|
|
this.prcsFiveMin = this.prevFiveMin; /* 20170718153000 - 이전 정주기 5분 시각 이용하여 입력 */
|
|
this.prcsFiveMinFrom = this.prevFiveMin; /* 20170718153000 - 이전 정주기 5분 시각 */
|
|
this.prcsFiveMinFrom = this.prevFiveMin; /* 20170718153000 - 이전 정주기 5분 시각 */
|