Java tutorial
//package com.java2s; import java.util.GregorianCalendar; public class Main { public static boolean isDayTimeNow() { int i = (new GregorianCalendar()).get(11); boolean flag; if ((long) i >= 6L && (long) i < 18L) flag = true; else flag = false; return flag; } }