shared
Class MyDate

java.lang.Object
  extended byjava.util.Date
      extended byshared.MyDate
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public class MyDate
extends java.util.Date

This class extends the standard Date class and customizes the toString method. This class also contains some helper methods to make the life easier.

Author:
buetow
See Also:
Serialized Form

Constructor Summary
MyDate(java.util.Date date)
           
 
Method Summary
static java.lang.String addZerosToFront(int iValue, int iWantedLength)
          This method adds zeros in front of a number and returns it as a string.
 java.lang.String toString()
           
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, UTC
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MyDate

public MyDate(java.util.Date date)
Method Detail

toString

public java.lang.String toString()
See Also:
Object.toString()

addZerosToFront

public static java.lang.String addZerosToFront(int iValue,
                                               int iWantedLength)
This method adds zeros in front of a number and returns it as a string.

Parameters:
iValue - Specifies the number to add zeros to.
iWantedLength - Specifies the wanted max length of the string.
Returns:
Returns the number represented as a string with additional zeros on front.