org.opensync.tools
Class APDateFormatter

java.lang.Object
  extended byorg.opensync.tools.APDateFormatter

public class APDateFormatter
extends java.lang.Object

An incomplete class. The class was written in the hope that it would provide all the functionalities of a date formatter. But, for now, it just provides parse function.


Field Summary
static int AP_DB1
           
static int AP_DB2
           
static int AP_PDA
           
 
Constructor Summary
APDateFormatter()
           
APDateFormatter(int formatType)
           
APDateFormatter(java.lang.String formatString)
           
 
Method Summary
 java.lang.String format(java.util.Date date)
           
 java.lang.String getDateString()
           
 java.lang.String getTimeString()
           
static void main(java.lang.String[] args)
           
 java.util.Date parse(java.lang.String str)
          Parse function accepts strings in the form YYYYDDMM and parses it to a date.
 java.util.Date parse(java.lang.String date, java.lang.String time)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AP_PDA

public static final int AP_PDA
See Also:
Constant Field Values

AP_DB1

public static final int AP_DB1
See Also:
Constant Field Values

AP_DB2

public static final int AP_DB2
See Also:
Constant Field Values
Constructor Detail

APDateFormatter

public APDateFormatter(int formatType)

APDateFormatter

public APDateFormatter(java.lang.String formatString)

APDateFormatter

public APDateFormatter()
Method Detail

format

public java.lang.String format(java.util.Date date)

getDateString

public java.lang.String getDateString()

getTimeString

public java.lang.String getTimeString()

parse

public java.util.Date parse(java.lang.String str)
                     throws java.text.ParseException
Parse function accepts strings in the form YYYYDDMM and parses it to a date. Feel free to add more functionality to this method to support more formats.

Throws:
java.text.ParseException

parse

public java.util.Date parse(java.lang.String date,
                            java.lang.String time)
                     throws java.text.ParseException
Throws:
java.text.ParseException

main

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


Copyright © 2004 sourceforge. All Rights Reserved.