Class XMPDateTimeImpl

java.lang.Object
com.itextpdf.xmp.impl.XMPDateTimeImpl
All Implemented Interfaces:
XMPDateTime, Comparable

public class XMPDateTimeImpl extends Object implements XMPDateTime
The implementation of XMPDateTime. Internally a calendar is used plus an additional nano seconds field, because Calendar supports only milli seconds. The nanoSeconds convers only the resolution beyond a milli second.
Since:
16.02.2006
  • Field Details

    • year

      private int year
    • month

      private int month
    • day

      private int day
    • hour

      private int hour
    • minute

      private int minute
    • second

      private int second
    • timeZone

      private TimeZone timeZone
      Use NO time zone as default
    • nanoSeconds

      private int nanoSeconds
      The nano seconds take micro and nano seconds, while the milli seconds are in the calendar.
    • hasDate

      private boolean hasDate
    • hasTime

      private boolean hasTime
    • hasTimeZone

      private boolean hasTimeZone
  • Constructor Details

    • XMPDateTimeImpl

      public XMPDateTimeImpl()
      Creates an XMPDateTime-instance with the current time in the default time zone.
    • XMPDateTimeImpl

      public XMPDateTimeImpl(Calendar calendar)
      Creates an XMPDateTime-instance from a calendar.
      Parameters:
      calendar - a Calendar
    • XMPDateTimeImpl

      public XMPDateTimeImpl(Date date, TimeZone timeZone)
      Creates an XMPDateTime-instance from a Date and a TimeZone.
      Parameters:
      date - a date describing an absolute point in time
      timeZone - a TimeZone how to interpret the date
    • XMPDateTimeImpl

      public XMPDateTimeImpl(String strValue) throws XMPException
      Creates an XMPDateTime-instance from an ISO 8601 string.
      Parameters:
      strValue - an ISO 8601 string
      Throws:
      XMPException - If the string is a non-conform ISO 8601 string, an exception is thrown
  • Method Details