-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmoonphase.php
More file actions
33 lines (23 loc) · 740 Bytes
/
moonphase.php
File metadata and controls
33 lines (23 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
require('Classes/Moonphase.php');
$moonphase = new \TTREE\moonphase();
// phaseHunting() Example
print "<pre>";
print "Example: phaseHunting()\n";
print "-----------------------\n";
$moonphase->calculatePhaseHunting();
print "\n\n";
// findPhaseList() Example
print "Example: findPhaseList()\n";
print "------------------------\n";
$startDate = new DateTime("2012-01-01 00:00:00 CEST");
$endDate = new DateTime("2012-12-01 00:00:00 CEST");
$moonphase->calculatePhaseList($startDate, $endDate);
print "\n\n";
// calculatePhase() Example
$date = new DateTime('2012-01-01 00:00:00 CEST');
print "Example: calculatePhase()\n";
print "-------------------------\n";
$moonphase->calculatePhaseByDate($date);
print "</pre>\n\n";
?>