Android examples for java.util:Date Time
is Night Time by hour
//package com.java2s; public class Main { public static boolean isNightTime(int hour) { //Tells us if it's day or night! //Used for updating the background colour. boolean isNight; isNight = hour < 6 || hour > 18; return isNight; }//from w ww .j a va 2 s . com }