test_class.file: rome/src/test/java/com/rometools/rome/io/impl/DateParserTest.java
test_class.identifier: DateParserTest
test_case.body: @Test
      public void parseW3CDateTimeWithTrailingWhitespaceIsOk() throws Exception {
          assertEquals(
                  new Date(1000),
                  DateParser.parseW3CDateTime("1970-01-01T00:00:01+00:00   ", Locale.GERMANY)
          );
      }
test_case.class_method_signature: DateParserTest.parseW3CDateTimeWithTrailingWhitespaceIsOk()
test_case.full_signature: @Test public void parseW3CDateTimeWithTrailingWhitespaceIsOk()
test_case.identifier: parseW3CDateTimeWithTrailingWhitespaceIsOk
test_case.invocations: assertEquals parseW3CDateTime
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void parseW3CDateTimeWithTrailingWhitespaceIsOk()
focal_class.declarator: ADDITIONAL_MASKS
focal_class.modifier: private static
focal_class.original_string: private static String[] ADDITIONAL_MASKS;
focal_class.type: String[]
focal_class.var_name: ADDITIONAL_MASKS
focal_class.declarator: RFC822_MASKS = { "EEE, dd MMM yy HH:mm:ss z", "EEE, dd MMM yy HH:mm z", "dd MMM yy HH:mm:ss z", "dd MMM yy HH:mm z" }
focal_class.modifier: private static final
focal_class.original_string: private static final String[] RFC822_MASKS = { "EEE, dd MMM yy HH:mm:ss z", "EEE, dd MMM yy HH:mm z", "dd MMM yy HH:mm:ss z", "dd MMM yy HH:mm z" };
focal_class.type: String[]
focal_class.var_name: RFC822_MASKS
focal_class.declarator: W3CDATETIME_MASKS = { "yyyy-MM-dd'T'HH:mm:ss.SSSz", "yyyy-MM-dd't'HH:mm:ss.SSSz", "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
              "yyyy-MM-dd't'HH:mm:ss.SSS'z'", "yyyy-MM-dd'T'HH:mm:ssz", "yyyy-MM-dd't'HH:mm:ssz", "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd't'HH:mm:ssZ",
              "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd't'HH:mm:ss'z'", "yyyy-MM-dd'T'HH:mmz", // together
              // with
              // logic
              // in
              // the
              // parseW3CDateTime
              // they
              "yyyy-MM'T'HH:mmz", // handle W3C dates without time forcing them to
              // be GMT
              "yyyy'T'HH:mmz", "yyyy-MM-dd't'HH:mmz", "yyyy-MM-dd'T'HH:mm'Z'", "yyyy-MM-dd't'HH:mm'z'", "yyyy-MM-dd", "yyyy-MM", "yyyy" }
focal_class.modifier: private static final
focal_class.original_string: private static final String[] W3CDATETIME_MASKS = { "yyyy-MM-dd'T'HH:mm:ss.SSSz", "yyyy-MM-dd't'HH:mm:ss.SSSz", "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
              "yyyy-MM-dd't'HH:mm:ss.SSS'z'", "yyyy-MM-dd'T'HH:mm:ssz", "yyyy-MM-dd't'HH:mm:ssz", "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd't'HH:mm:ssZ",
              "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd't'HH:mm:ss'z'", "yyyy-MM-dd'T'HH:mmz", // together
              // with
              // logic
              // in
              // the
              // parseW3CDateTime
              // they
              "yyyy-MM'T'HH:mmz", // handle W3C dates without time forcing them to
              // be GMT
              "yyyy'T'HH:mmz", "yyyy-MM-dd't'HH:mmz", "yyyy-MM-dd'T'HH:mm'Z'", "yyyy-MM-dd't'HH:mm'z'", "yyyy-MM-dd", "yyyy-MM", "yyyy" };
focal_class.type: String[]
focal_class.var_name: W3CDATETIME_MASKS
focal_class.declarator: masks = { "yyyy-MM-dd'T'HH:mm:ss.SSSz", "yyyy-MM-dd't'HH:mm:ss.SSSz", // invalid
              "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", "yyyy-MM-dd't'HH:mm:ss.SSS'z'", // invalid
              "yyyy-MM-dd'T'HH:mm:ssz", "yyyy-MM-dd't'HH:mm:ssz", // invalid
              "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd't'HH:mm:ss'z'", // invalid
              "yyyy-MM-dd'T'HH:mmz", // invalid
              "yyyy-MM-dd't'HH:mmz", // invalid
              "yyyy-MM-dd'T'HH:mm'Z'", // invalid
              "yyyy-MM-dd't'HH:mm'z'", // invalid
              "yyyy-MM-dd", "yyyy-MM", "yyyy" }
focal_class.modifier: @SuppressWarnings("unused")
      private static final
focal_class.original_string: @SuppressWarnings("unused")
      private static final String[] masks = { "yyyy-MM-dd'T'HH:mm:ss.SSSz", "yyyy-MM-dd't'HH:mm:ss.SSSz", // invalid
              "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", "yyyy-MM-dd't'HH:mm:ss.SSS'z'", // invalid
              "yyyy-MM-dd'T'HH:mm:ssz", "yyyy-MM-dd't'HH:mm:ssz", // invalid
              "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd't'HH:mm:ss'z'", // invalid
              "yyyy-MM-dd'T'HH:mmz", // invalid
              "yyyy-MM-dd't'HH:mmz", // invalid
              "yyyy-MM-dd'T'HH:mm'Z'", // invalid
              "yyyy-MM-dd't'HH:mm'z'", // invalid
              "yyyy-MM-dd", "yyyy-MM", "yyyy" };
focal_class.type: String[]
focal_class.var_name: masks
focal_class.file: rome/src/main/java/com/rometools/rome/io/impl/DateParser.java
focal_class.identifier: DateParser
focal_class.class_method_signature: DateParser.DateParser()
focal_class.full_signature: private  DateParser()
focal_class.identifier: DateParser
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  DateParser()
focal_class.class_method_signature: DateParser.parseUsingMask(final String[] masks, String sDate, final Locale locale)
focal_class.full_signature: private static Date parseUsingMask(final String[] masks, String sDate, final Locale locale)
focal_class.identifier: parseUsingMask
focal_class.modifiers: private static
focal_class.parameters: (final String[] masks, String sDate, final Locale locale)
focal_class.return: Date
focal_class.signature: Date parseUsingMask(final String[] masks, String sDate, final Locale locale)
focal_class.class_method_signature: DateParser.parseRFC822(String sDate, final Locale locale)
focal_class.full_signature: public static Date parseRFC822(String sDate, final Locale locale)
focal_class.identifier: parseRFC822
focal_class.modifiers: public static
focal_class.parameters: (String sDate, final Locale locale)
focal_class.return: Date
focal_class.signature: Date parseRFC822(String sDate, final Locale locale)
focal_class.class_method_signature: DateParser.convertUnsupportedTimeZones(String sDate)
focal_class.full_signature: private static String convertUnsupportedTimeZones(String sDate)
focal_class.identifier: convertUnsupportedTimeZones
focal_class.modifiers: private static
focal_class.parameters: (String sDate)
focal_class.return: String
focal_class.signature: String convertUnsupportedTimeZones(String sDate)
focal_class.class_method_signature: DateParser.replaceLastOccurrence(String original, String target, String replacement)
focal_class.full_signature: private static String replaceLastOccurrence(String original, String target, String replacement)
focal_class.identifier: replaceLastOccurrence
focal_class.modifiers: private static
focal_class.parameters: (String original, String target, String replacement)
focal_class.return: String
focal_class.signature: String replaceLastOccurrence(String original, String target, String replacement)
focal_class.class_method_signature: DateParser.parseW3CDateTime(String sDate, final Locale locale)
focal_class.full_signature: public static Date parseW3CDateTime(String sDate, final Locale locale)
focal_class.identifier: parseW3CDateTime
focal_class.modifiers: public static
focal_class.parameters: (String sDate, final Locale locale)
focal_class.return: Date
focal_class.signature: Date parseW3CDateTime(String sDate, final Locale locale)
focal_class.class_method_signature: DateParser.parseDate(final String sDate, final Locale locale)
focal_class.full_signature: public static Date parseDate(final String sDate, final Locale locale)
focal_class.identifier: parseDate
focal_class.modifiers: public static
focal_class.parameters: (final String sDate, final Locale locale)
focal_class.return: Date
focal_class.signature: Date parseDate(final String sDate, final Locale locale)
focal_class.class_method_signature: DateParser.formatRFC822(final Date date, final Locale locale)
focal_class.full_signature: public static String formatRFC822(final Date date, final Locale locale)
focal_class.identifier: formatRFC822
focal_class.modifiers: public static
focal_class.parameters: (final Date date, final Locale locale)
focal_class.return: String
focal_class.signature: String formatRFC822(final Date date, final Locale locale)
focal_class.class_method_signature: DateParser.formatW3CDateTime(final Date date, final Locale locale)
focal_class.full_signature: public static String formatW3CDateTime(final Date date, final Locale locale)
focal_class.identifier: formatW3CDateTime
focal_class.modifiers: public static
focal_class.parameters: (final Date date, final Locale locale)
focal_class.return: String
focal_class.signature: String formatW3CDateTime(final Date date, final Locale locale)
focal_method.body: public static Date parseW3CDateTime(String sDate, final Locale locale) {
          // if sDate has time on it, it injects 'GTM' before de TZ displacement to allow the
          // SimpleDateFormat parser to parse it properly
          final int tIndex = sDate.indexOf("T");
          if (tIndex > -1) {
              if (sDate.endsWith("Z")) {
                  sDate = sDate.substring(0, sDate.length() - 1) + "+00:00";
              }
              int tzdIndex = sDate.indexOf("+", tIndex);
              if (tzdIndex == -1) {
                  tzdIndex = sDate.indexOf("-", tIndex);
              }
              if (tzdIndex > -1) {
                  String pre = sDate.substring(0, tzdIndex);
                  final int secFraction = pre.indexOf(",");
                  if (secFraction > -1) {
                      pre = pre.substring(0, secFraction);
                  }
                  final String post = sDate.substring(tzdIndex);
                  sDate = pre + "GMT" + post;
              }
          } else {
              sDate += "T00:00GMT";
          }
          return parseUsingMask(W3CDATETIME_MASKS, sDate, locale);
      }
focal_method.class_method_signature: DateParser.parseW3CDateTime(String sDate, final Locale locale)
focal_method.full_signature: public static Date parseW3CDateTime(String sDate, final Locale locale)
focal_method.identifier: parseW3CDateTime
focal_method.invocations: indexOf endsWith substring length indexOf indexOf substring indexOf substring substring parseUsingMask
focal_method.modifiers: public static
focal_method.parameters: (String sDate, final Locale locale)
focal_method.return: Date
focal_method.signature: Date parseW3CDateTime(String sDate, final Locale locale)