This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 根据经纬度计算日出日落时间 | |
* @param lat 纬度 | |
* @param lng 经度 | |
* @param isSunRise true计算日出,false计算日落 | |
* @return int[] 0位置为小时,1位置为分钟 | |
*/ | |
public static int[] getDayTime(double lat, double lng, boolean isSunRise){ | |
lat = Math.toRadians(lat); |