Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mitre.cvw
Class DateUtils  view DateUtils download DateUtils.java

java.lang.Object
  extended byorg.mitre.cvw.DateUtils

public class DateUtils
extends java.lang.Object

This class provides static functions for displaying dates

Version:
1

Field Summary
static java.util.Date dateZero
           
 
Constructor Summary
DateUtils()
           
 
Method Summary
static long convertDateFromServer(java.lang.String str)
          Returns a long value representing the date given a string.
static java.lang.String formatDate(java.util.Date date)
          Returns a string representing the date based on the user preference for local time or GMT time.
static java.lang.String formatDate(java.lang.String time)
          Returns a string representing the server date string based on the user preference for local time or GMT time.
static java.lang.String formatDateTime(java.util.Date date)
          Returns a string representing the date based on the user preference for local time or GMT time.
static java.lang.String formatDateTime(java.lang.String time)
          Returns a string representing the server date string based on the user preference for local time or GMT time.
static java.lang.String formatDateUsingPattern(java.util.Date date, java.lang.String pat)
          Returns a string representing the date based on the user preference for local time or GMT time.
static java.lang.String parseFormatDateUsingPattern(java.lang.String date, java.lang.String pat, java.lang.String format)
          Returns a string representing the date string using the pattern to the parse and format as the display format based on the user preference for local time or GMT time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dateZero

public static final java.util.Date dateZero
Constructor Detail

DateUtils

public DateUtils()
Method Detail

formatDateTime

public static java.lang.String formatDateTime(java.util.Date date)
Returns a string representing the date based on the user preference for local time or GMT time.


formatDateTime

public static java.lang.String formatDateTime(java.lang.String time)
Returns a string representing the server date string based on the user preference for local time or GMT time.


formatDate

public static java.lang.String formatDate(java.util.Date date)
Returns a string representing the date based on the user preference for local time or GMT time.


formatDate

public static java.lang.String formatDate(java.lang.String time)
Returns a string representing the server date string based on the user preference for local time or GMT time.


formatDateUsingPattern

public static java.lang.String formatDateUsingPattern(java.util.Date date,
                                                      java.lang.String pat)
Returns a string representing the date based on the user preference for local time or GMT time.


parseFormatDateUsingPattern

public static java.lang.String parseFormatDateUsingPattern(java.lang.String date,
                                                           java.lang.String pat,
                                                           java.lang.String format)
Returns a string representing the date string using the pattern to the parse and format as the display format based on the user preference for local time or GMT time.


convertDateFromServer

public static long convertDateFromServer(java.lang.String str)
Returns a long value representing the date given a string. java dates are stored in milliseconds and the CVW server measures in seconds so we append "000" Dee Goepel