Lines Matching refs:strDate
137 * @param strDate
140 * if <code>strDate</code> is in an invalid format.
142 public static Date stringToDate(String strDate) throws ParseException {
147 int idxT = strDate.indexOf('T');
152 int idxDiffUTC = strDate.indexOf('-', idxT);
154 idxDiffUTC = strDate.indexOf('+', idxT);
159 diffTime = getDiffTime(strDate, idxDiffUTC);
160 strDate = strDate.substring(0, idxDiffUTC);
163 int idxMilliSec = strDate.indexOf('.');
165 strDate = strDate.substring(0, idxMilliSec);
168 char lastChar = strDate.charAt(strDate.length() - 1);
170 strDate = strDate.substring(0, strDate.length() - 1);
174 return createDate(strDate, diffTime, plusTime);
182 * @param strDate
188 * if <code>strDate</code> is in an invalid format.
190 private static int[] getDiffTime(String strDate, int idx)
193 String strDiff = strDate.substring(idx + 1, strDate.length() - 1);
214 * @param strDate
223 private static Date createDate(String strDate, int[] timeDiff,
226 int year = Integer.parseInt(strDate.substring(0, 4));
227 if (strDate.charAt(4) != '-') {
231 int month = Integer.parseInt(strDate.substring(5, 7)) - 1;
232 if (strDate.charAt(7) != '-') {
236 int day = Integer.parseInt(strDate.substring(8, 10));
237 if (strDate.charAt(10) != 'T') {
241 int hour = Integer.parseInt(strDate.substring(11, 13));
242 if (strDate.charAt(13) != ':') {
246 int minute = Integer.parseInt(strDate.substring(14, 16));
249 if (strDate.length() > 17) {
250 if (strDate.charAt(16) != ':') {
254 second = Integer.parseInt(strDate.substring(17, 19));