mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-01 23:13:48 +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()));
|
|
}
|
|
}
|