jsky.util
Class CalendarUtil

java.lang.Object
  extended by jsky.util.CalendarUtil

public class CalendarUtil
extends java.lang.Object

Utility methods for using the Calendar class.


Constructor Summary
CalendarUtil()
           
 
Method Summary
static void main(java.lang.String[] args)
          Test main.
static void setHours(java.util.Calendar cal, double hours, boolean nextDay)
          Set the time of day from decimal hours (0..24).
static java.lang.String toString(java.util.Calendar cal)
          Format the given calendar's date and return it.
static java.lang.String toString(java.util.Date date, java.lang.String timezoneName)
          Format the given date in the named timezone and return it.
static java.lang.String toString(long time, java.lang.String timezoneName)
          Format the given time value (seconds since 1970...) in the named timezone and return it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalendarUtil

public CalendarUtil()
Method Detail

setHours

public static void setHours(java.util.Calendar cal,
                            double hours,
                            boolean nextDay)
Set the time of day from decimal hours (0..24). If next day is true, use the next day's date.


toString

public static java.lang.String toString(java.util.Calendar cal)
Format the given calendar's date and return it.


toString

public static java.lang.String toString(java.util.Date date,
                                        java.lang.String timezoneName)
Format the given date in the named timezone and return it.


toString

public static java.lang.String toString(long time,
                                        java.lang.String timezoneName)
Format the given time value (seconds since 1970...) in the named timezone and return it.


main

public static void main(java.lang.String[] args)
Test main.