著作一覧 |
import java.util.*; ... Calendar c0 = Calendar.getInstance(); Calendar c1 = new GregorianCalendar(c0.get(Calendar.YEAR), c0.get(Calendar.MONTH), c0.get(Calendar.DATE)); c0.set(Calendar.HOUR, 0); c0.set(Calendar.MINUTE, 0); c0.set(Calendar.SECOND, 0); c0.set(Calendar.MILLISECOND, 0); if (c0.getTimeInMillis() == c1.getTimeInMillis()) { System.out.println("午前だよ"); } else { System.out.println("午後だよ"); }
ジェズイットを見習え |