com.beaglebuddy.id3.pojo.v24

## Class Timestamp

- java.lang.Object
- - com.beaglebuddy.id3.pojo.v24.Timestamp

-     public class Timestamp
      extends java.lang.Object

  This timestamp class is a read only version supported by the ID3v2.4 specification. It is used in the following Id3v2.4 frame types:

  - `FrameType.ENCODING_TIME`
  - `FrameType.ORIGINAL_RELEASE_TIME`
  - `FrameType.RECORDING_TIME`
  - `FrameType.RELEASE_TIME`
  - `FrameType.TAGGING_TIME`

  The timestamp fields are based on a subset of ISO 8601. When being as precise as possible the format of a time string is yyyy-MM-ddTHH:mm:ss (year, "-", month, "-", day, "T", hour (out of 24), ":", minutes, ":", seconds), but the precision may be reduced by removing as many time indicators as wanted. Hence, there are six valid timestamps:

  - yyyy
  - yyyy-MM
  - yyyy-MM-dd
  - yyyy-MM-ddTHH
  - yyyy-MM-ddTHH:mm
  - yyyy-MM-ddTHH:mm:ss
  All time stamps are UTC. For durations, use the slash character as described in 8601, and for multiple non-contiguous dates, use multiple strings, if allowed by the frame definition.
  See Also:
    ISO 8601, supported subset of ISO 8601

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Timestamp(int year)` constructor.
    `Timestamp(int year, int month)` constructor.
    `Timestamp(int year, int month, int day)` constructor.
    `Timestamp(int year, int month, int day, int hour)` constructor.
    `Timestamp(int year, int month, int day, int hour, int minute)` constructor.
    `Timestamp(int year, int month, int day, int hour, int minute, int second)` constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `toString()` get a string representation of the time stamp.

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

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

- - ### Constructor Detail

    - #### Timestamp

          public Timestamp(int year)
                    throws java.lang.IllegalArgumentException

      constructor. constructs the time stamp yyyy.
      Parameters:
        `year` - four digit year
      Throws:
        `java.lang.IllegalArgumentException` - if the year is less than or equal to 0.

    - #### Timestamp

          public Timestamp(int year,
                   int month)
                    throws java.lang.IllegalArgumentException

      constructor. constructs the time stamp yyyy-MM.
      Parameters:
        `year` - four digit year
        `month` - two digit month (1-12)
      Throws:
        `java.lang.IllegalArgumentException` - if the year is less than or equal to 0 or if the month is not in the range 1-12.

    - #### Timestamp

          public Timestamp(int year,
                   int month,
                   int day)
                    throws java.lang.IllegalArgumentException

      constructor. constructs the time stamp yyyy-MM-dd.
      Parameters:
        `year` - four digit year
        `month` - two digit month (1-12)
        `day` - two digit day (1-31)
      Throws:
        `java.lang.IllegalArgumentException` - if the year is less than or equal to 0, the month is not in the range 1-12, or if the day is not in the range 1-31.

    - #### Timestamp

          public Timestamp(int year,
                   int month,
                   int day,
                   int hour)
                    throws java.lang.IllegalArgumentException

      constructor. constructs the time stamp yyyy-MM-ddTHH.
      Parameters:
        `year` - four digit year
        `month` - two digit month (1-12)
        `day` - two digit day (1-31)
        `hour` - two digit hour (1-24)
      Throws:
        `java.lang.IllegalArgumentException` - if the year is less than or equal to 0, the month is not in the range 1-12, the day is not in the range 1-31, or if the hour is not in the range 1-24.

    - #### Timestamp

          public Timestamp(int year,
                   int month,
                   int day,
                   int hour,
                   int minute)
                    throws java.lang.IllegalArgumentException

      constructor. constructs the time stamp yyyy-MM-ddTHH:mm.
      Parameters:
        `year` - four digit year
        `month` - two digit month (1-12)
        `day` - two digit day (1-31)
        `hour` - two digit hour (1-24)
        `minute` - two digit minute (1-59)
      Throws:
        `java.lang.IllegalArgumentException` - if the year is less than or equal to 0, the month is not in the range 1-12, the day is not in the range 1-31, the hour is not in the range 1-24, or if minute is not in the range 1 - 59.

    - #### Timestamp

          public Timestamp(int year,
                   int month,
                   int day,
                   int hour,
                   int minute,
                   int second)
                    throws java.lang.IllegalArgumentException

      constructor. constructs the time stamp yyyy-MM-ddTHH:mm:ss.
      Parameters:
        `year` - four digit year
        `month` - two digit month (1-12)
        `day` - two digit day (1-31)
        `hour` - two digit hour (1-24)
        `minute` - two digit minute (1-59)
        `second` - two digit second (1-59)
      Throws:
        `java.lang.IllegalArgumentException` - if the year is less than or equal to 0, the month is not in the range 1-12, the day is not in the range 1-31, the hour is not in the range 1-24, the minute is not in the range 1 - 59, or if the second is not in the range 1 - 59.

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      get a string representation of the time stamp.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a string representation of the time stamp.