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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int day  
      private boolean hasDate  
      private boolean hasTime  
      private boolean hasTimeZone  
      private int hour  
      private int minute  
      private int month  
      private int nanoSeconds
      The nano seconds take micro and nano seconds, while the milli seconds are in the calendar.
      private int second  
      private java.util.TimeZone timeZone
      Use NO time zone as default
      private int year  
    • 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.
    • Field Detail

      • 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 java.util.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 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