blob: 13d26552c5ee382dc9e3e91266de619858603738 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
simple-astronomy-lib
A simple astronomy Java library for calculating moon phase, solar eclipses, etc.
http://code.google.com/p/simple-astronomy-lib/
import java.util.Calendar;
import java.util.TimeZone;
import com.bradsbrain.simpleastronomy.MoonPhaseFinder;
public class WerewolfCheck {
public static void main(String[] args) {
Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("America/Chicago"));
cal.clear();
cal.set(2011, Calendar.JUNE, 12);
System.out.println("The next full moon is on: " + MoonPhaseFinder.findFullMoonFollowing(cal));
}
}
|