import java.util.Date; import java.text.SimpleDateFormat; public class WriteForBlog { static private int beforeDays = 8; // Use this vaule to judge the start date within 7 days. static private long beforeSeconds = beforeDays * 24 * 60 * 60 * 1000; pu…
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd"); Date d1=format.parse(FHavetime); Date nowdate=new Date(); Date d2=format.parse(format.format(nowdate)); DcSiteMessagemodel dcyuyue=dcSiteMessageMng.getByid(3); DcSiteMessagemodel dcwaim…
public static void main(String[] args) { Date date = new Date(); SimpleDateFormat df = new SimpleDateFormat("HH"); String str = df.format(date); int a = Integer.parseInt(str); if (a >= 0 && a <= 6) { System.out.println("凌晨&quo…