| | |
| | | import java.util.TimeZone; |
| | | |
| | | public class DateUtil { |
| | | public static int getNowWeekDay() { |
| | | Calendar canlendar = Calendar.getInstance(); // java.util包 |
| | | int week= canlendar.get(Calendar.DAY_OF_WEEK); |
| | | return week == 0 ? 7 : week - 1; |
| | | } |
| | | |
| | | private static TimeZone tz = TimeZone.getTimeZone("GMT+8"); |
| | | |
| | |
| | | public static String getAllTime() { |
| | | return formatDate(new Date(), "yyyyMMddHHmmss"); |
| | | } |
| | | |
| | | public static int getNowWeekDay() { |
| | | Calendar canlendar = Calendar.getInstance(); // java.util包 |
| | | int week= canlendar.get(Calendar.DAY_OF_WEEK); |
| | | return week == 0 ? 7 : week - 1; |
| | | } |
| | | /** |
| | | * 获取YYYY-MM-DD HH:mm:ss格式 |
| | | */ |