com.mhuss.AstroLib
Class DarkCal
- java.lang.Object
-
- com.mhuss.AstroLib.DarkCal
-
public class DarkCal extends java.lang.ObjectA command-line program to determine the darkest hours for a given location & month. This is meant to be an aid for planning your observing.
-
-
Constructor Summary
Constructors Constructor and Description DarkCal(boolean html)Constructor (HTML switch only)DarkCal(java.io.PrintWriter pw, boolean html)Constructor (PrintWriter and HTML switch)DarkCal(java.io.PrintWriter pw, boolean html, boolean printable)Constructor (PrintWriter, HTML switch, and printable switch)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcalcAndPrint(DarkCalInput dci)Calculate the DarkCalData values and print them out.static voidmain(java.lang.String[] args)The main program entry point.voidprint(DarkCalInput dci)Read the DarkCalData values and print them out.voidprintData(DarkCalData dcd)Print out the datavoidsetOptLink(java.lang.String s)Set the optional return link URL.
-
-
-
Constructor Detail
-
DarkCal
public DarkCal(boolean html)
Constructor (HTML switch only)- Parameters:
html- true to produce HTML formatted output, plain text otherwise
-
DarkCal
public DarkCal(java.io.PrintWriter pw, boolean html)Constructor (PrintWriter and HTML switch)- Parameters:
pw- java.io.PrintWriter instance to use for outputhtml- true to produce HTML formatted output, plain text otherwise
-
DarkCal
public DarkCal(java.io.PrintWriter pw, boolean html, boolean printable)Constructor (PrintWriter, HTML switch, and printable switch)- Parameters:
pw- java.io.PrintWriter instance to use for outputhtml- true to produce HTML formatted output, plain text otherwiseprintable- true to produce HTML in a more printer-friendly format
-
-
Method Detail
-
setOptLink
public void setOptLink(java.lang.String s)
Set the optional return link URL. It only makes sense to use this function when the HTML output option is enabled.- Parameters:
s- The URL of the return link to insert into the HTML
-
printData
public void printData(DarkCalData dcd)
Print out the data- Parameters:
dcd- The DarkCalData instance to use
-
calcAndPrint
public void calcAndPrint(DarkCalInput dci)
Calculate the DarkCalData values and print them out.- Parameters:
dci- Month, year, and location to use
-
print
public void print(DarkCalInput dci)
Read the DarkCalData values and print them out.- Parameters:
dci- Month, year, and location to use
-
main
public static void main(java.lang.String[] args)
The main program entry point.usage: DarkCal <month> <year> [-d] [-h] [-t] [-u]
-d = ignore daylight savings time
-h = HTML table output
-t = tab-delimited output
-u = output time in UTCNotes:
- This program requires a text configuration file called DarkCal.cfg. To produce a sample config file, with all possible options listed, run the program with no DarkCal.cfg file in the current directory or in C:\etc.
- Command-line options override config file settings.
- This program currently only supports the Gregorian calendar.
-
-
DMelt 3.0 © DataMelt by jWork.ORG