org.bouncycastle.asn1.eac

## Class PackedDate

- java.lang.Object
- - org.bouncycastle.asn1.eac.PackedDate

-     public class PackedDate
      extends java.lang.Object

  EAC encoding date object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PackedDate(java.util.Date time)` Base constructor from a java.util.date object.
    `PackedDate(java.util.Date time, java.util.Locale locale)` Base constructor from a java.util.date object.
    `PackedDate(java.lang.String time)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)`
    `java.util.Date` | `getDate()` return the time as a date based on whatever a 2 digit year will return.
    `byte[]` | `getEncoding()`
    `int` | `hashCode()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PackedDate

          public PackedDate(java.lang.String time)

    - #### PackedDate

          public PackedDate(java.util.Date time)

      Base constructor from a java.util.date object.
      Parameters:
        `time` - a date object representing the time of interest.

    - #### PackedDate

          public PackedDate(java.util.Date time,
                            java.util.Locale locale)

      Base constructor from a java.util.date object. You may need to use this constructor if the default locale doesn't use a Gregorian calender so that the PackedDate produced is compatible with other ASN.1 implementations.
      Parameters:
        `time` - a date object representing the time of interest.
        `locale` - an appropriate Locale for producing an ASN.1 GeneralizedTime value.

  - ### Method Detail

    - #### getDate

          public java.util.Date getDate()
                                 throws java.text.ParseException

      return the time as a date based on whatever a 2 digit year will return. For standardised processing use getAdjustedDate().
      Returns:
        the resulting date
      Throws:
        `java.text.ParseException` - if the date string cannot be parsed.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getEncoding

          public byte[] getEncoding()