mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 22:13:25 +01:00
19 lines
490 B
Java
19 lines
490 B
Java
|
|
package com.gamingmesh.jobs.stuff;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Calendar;
|
|
|
|
public class TimeManage {
|
|
public static int timeInInt() {
|
|
return timeInInt(System.currentTimeMillis());
|
|
}
|
|
|
|
public static int timeInInt(Long time) {
|
|
SimpleDateFormat formatter = new SimpleDateFormat("YYMMdd");
|
|
Calendar calendar = Calendar.getInstance();
|
|
calendar.setTimeInMillis(time);
|
|
return Integer.valueOf(formatter.format(calendar.getTime()));
|
|
}
|
|
}
|