View Javadoc

1   package com.atlassian.marketplace.client.encoding;
2   
3   import org.joda.time.DateTimeZone;
4   import org.joda.time.format.DateTimeFormat;
5   import org.joda.time.format.DateTimeFormatter;
6   import org.joda.time.format.ISODateTimeFormat;
7   
8   /**
9    * Defines the format strings used for date and date/time values in the Marketplace REST API.
10   * @since 2.0.0
11   */
12  public abstract class DateFormats
13  {
14      private DateFormats()
15      {
16      }
17      
18      /**
19       * The format used for all string representations of dates that do not have time values or time zones.
20       */
21      public static DateTimeFormatter DATE_FORMAT = DateTimeFormat.forPattern("yyyy-MM-dd");
22  
23      /**
24       * The format used for all string representations of dates that also have time values.
25       */
26      public static DateTimeFormatter DATE_TIME_FORMAT = ISODateTimeFormat.dateTime().withZone(DateTimeZone.UTC);
27  }