Android Daylight Check isInDayLight()

Here you can find the source of isInDayLight()

Description

is In Day Light

License

Open Source License

Declaration

public static boolean isInDayLight() 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

public class Main {
    public static boolean isInDayLight() {
        Date date = Calendar.getInstance().getTime();
        TimeZone tz = TimeZone.getDefault();
        return tz.inDaylightTime(date);
    }/*from  w w  w  .j  a v  a  2  s  .  c  o  m*/
}