Class XMPDateTimeImpl

  • All Implemented Interfaces:
    XMPDateTime, java.lang.Comparable

    public class XMPDateTimeImpl
    extends java.lang.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
    • Constructor Summary

      Constructors 
      Constructor Description
      XMPDateTimeImpl()
      Creates an XMPDateTime-instance with the current time in the default time zone.
      XMPDateTimeImpl​(java.lang.String strValue)
      Creates an XMPDateTime-instance from an ISO 8601 string.
      XMPDateTimeImpl​(java.util.Calendar calendar)
      Creates an XMPDateTime-instance from a calendar.
      XMPDateTimeImpl​(java.util.Date date, java.util.TimeZone timeZone)
      Creates an XMPDateTime-instance from a Date and a TimeZone.
    • Constructor Detail

      • XMPDateTimeImpl

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

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

        public XMPDateTimeImpl​(java.util.Date date,
                               java.util.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​(java.lang.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