mhuss utils 1.1.5ws

com.mhuss.AstroLib
Class DarkCal

java.lang.Object
  extended by com.mhuss.AstroLib.DarkCal

public class DarkCal
extends java.lang.Object

A 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
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
 void calcAndPrint(DarkCalInput dci)
          Calculate the DarkCalData values and print them out.
static void main(java.lang.String[] args)
          The main program entry point.
 void print(DarkCalInput dci)
          Read the DarkCalData values and print them out.
 void printData(DarkCalData dcd)
          Print out the data
 void setOptLink(java.lang.String s)
          Set the optional return link URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 output
html - 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 output
html - true to produce HTML formatted output, plain text otherwise
printable - 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 UTC

Notes:


mhuss utils 1.1.5ws

bottom text