Get the date of the fight

@param td a td from sherdogs table
@return the zonedatetime of the fight
552043
private ZonedDateTime getDate(Element td) {
        //date
        Element date = td.select("span.sub_line").first();

        return ParserUtils.getDateFromStringToZoneId(date.html(), ZONE_ID, DateTimeFormatter.ofPattern("MMM / dd / yyyy", Locale.US));
    }
896312
@Override
  public long getUpdateTime(Table table) throws UpdateNotFoundException {
    try {
      return getUpdateTime(table.getDataLocation());
    } catch (IOException e) {
      throw new UpdateNotFoundException(String.format("Failed to get update time for %s.", table.getCompleteName()), e);
    }
  }
1249803
function(id) {
        var date = this.getDateFieldsByCellId(id);
        return (date) ? DateMath.getDate(date[0],date[1]-1,date[2]) : null;
    }
813446
public Date getDate(int columnIndex) {
		Object fieldValue = data[columnIndex];
		if (fieldValue == null) {
			return null;
		}
		if (fieldValue instanceof Date) {
			return (Date) fieldValue;
		}
		throw new DBFException(
				"Unsupported type for Date at column:" + columnIndex + " " + fieldValue.getClass().getCanonicalName());
	}
1010213
private List<Fight> parseEventFights(Elements trs, Event event) {
        SherdogBaseObject sEvent = new SherdogBaseObject();
        sEvent.setName(event.getName());
        sEvent.setSherdogUrl(event.getSherdogUrl());

        List<Fight> fights = new ArrayList<>();

        if (trs.size() > 0) {
            trs.remove(0);

            trs.forEach(tr -> {
                Fight fight = new Fight();
                fight.setEvent(sEvent);
                fight.setDate(event.getDate());
                Elements tds = tr.select("td");

                fight.setFighter1(getFighter(tds.get(FIGHTER1_COLUMN)));
                fight.setFighter2(getFighter(tds.get(FIGHTER2_COLUMN)));

                //parsing old fight, we can get the result
                if (tds.size() == 7) {
                    fight.setResult(getResult(tds.get(FIGHTER1_COLUMN)));
                    fight.setWinMethod(getMethod(tds.get(METHOD_COLUMN)));
                    fight.setWinRound(getRound(tds.get(ROUND_COLUMN)));
                    fight.setWinTime(getTime(tds.get(TIME_COLUMN)));
                }

                fights.add(fight);
                logger.info("Fight added: {}", fight);
            });
        }

        return fights;
    }
281960
@Override
	public Date get(AuthzTrans trans, String table, int seg) {
		Date[] dates = info.get(table);
		if(dates==null) {
			dates = new Date[seg+1];
			touch(trans,table, seg);
		} else if(dates.length<=seg) {
			Date[] temp = new Date[seg+1];
			System.arraycopy(dates, 0, temp, 0, dates.length);
			dates = temp;
		}
		Date rv = dates[seg];
		if(rv==null) {
			rv=dates[seg]=startTime;
		}
		return rv;
	}
5492
public static DateTime toDateTime(String dateTime, String timeZoneId) {
    return dateTimesHelper.toDateTime(dateTime, timeZoneId);
  }
781934
public Date toDate() {
		TimeZone timezone = utc ? TimeZone.getTimeZone("UTC") : TimeZone.getDefault();
		return toDate(timezone);
	}
7577
public Date getTime() {
        if (utc == null) {
            return null;
        }
        Date date = null;
        try {
            date = XmppDateTime.parseDate(utc);
        }
        catch (Exception e) {
            LOGGER.log(Level.SEVERE, "Error getting local time", e);
        }
        return date;
    }
1340655
public Date getDate(String fieldName) throws DbfException {
        Date value = (Date) get(fieldName);
        return value == null ? null : value;
    }
179729
public T toDateTime(String dateTime, String timeZoneId) {
    return toDateTime(ISODateTimeFormat.dateHourMinuteSecond().parseDateTime(dateTime)
        .withZoneRetainFields(DateTimeZone.forTimeZone(TimeZone.getTimeZone(timeZoneId))));
  }
524199
private String[] getExpectedRow( TableIterator<String[]> tableRowIterator, DateTime expectedDT ) throws IOException {
        while( tableRowIterator.hasNext() ) {
            String[] row = tableRowIterator.next();
            DateTime currentTimestamp = formatter.parseDateTime(row[1]);
            if (currentTimestamp.equals(expectedDT)) {
                if (pNum == 1) {
                    return row;
                } else {
                    String[][] allRows = new String[pNum][];
                    allRows[0] = row;
                    int rowNum = 1;
                    for( int i = 1; i < pNum; i++ ) {
                        if (tableRowIterator.hasNext()) {
                            String[] nextRow = tableRowIterator.next();
                            allRows[i] = nextRow;
                            rowNum++;
                        }
                    }
                    // now aggregate
                    String[] aggregatedRow = new String[row.length];
                    // date is the one of the first instant
                    aggregatedRow[0] = allRows[0][0];
                    aggregatedRow[1] = allRows[0][1];
                    for( int col = 2; col < allRows[0].length; col++ ) {

                        boolean hasOne = false;
                        switch( pAggregation ) {
                        case 0:
                            double sum = 0;
                            for( int j = 0; j < rowNum; j++ ) {
                                String valueStr = allRows[j][col];
                                if (!valueStr.equals(fileNovalue)) {
                                    double value = Double.parseDouble(valueStr);
                                    sum = sum + value;
                                    hasOne = true;
                                }
                            }
                            if (!hasOne) {
                                sum = doubleNovalue;
                            }
                            aggregatedRow[col] = String.valueOf(sum);
                            break;
                        case 1:
                            double avg = 0;
                            for( int j = 0; j < rowNum; j++ ) {
                                String valueStr = allRows[j][col];
                                if (!valueStr.equals(fileNovalue)) {
                                    double value = Double.parseDouble(valueStr);
                                    avg = avg + value;
                                    hasOne = true;
                                }
                            }
                            if (!hasOne) {
                                avg = doubleNovalue;
                            } else {
                                avg = avg / pNum;
                            }
                            aggregatedRow[col] = String.valueOf(avg);
                            break;

                        default:
                            break;
                        }

                    }
                    return aggregatedRow;
                }
            } else if (currentTimestamp.isBefore(expectedDT)) {
                // browse until the instant is found
                continue;
            } else if (currentTimestamp.isAfter(expectedDT)) {
                /*
                 * lost the moment, for now throw exception.
                 * Could be enhanced in future.
                 */
                String message = "The data are not aligned with the simulation interval (" + currentTimestamp + "/" + expectedDT
                        + "). Check your data file: " + file;
                throw new IOException(message);
            }

        }
        return null;
    }
528988
@Override
    public Date getDate(String parameterName, Calendar cal) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
816959
protected static Date getTime(final Date referenceDate, final Calendar cal) {
        final Date zonedDate = new DateTime(referenceDate);
        zonedDate.setTime(cal.getTime().getTime());
        return zonedDate;
    }
273369
public static Date getTime(Datebox datebox, Timebox timebox) {
        if (timebox.getValue() == null || datebox.getValue() == null) {
            return DateUtil.stripTime(datebox.getValue());
        }

        Calendar date = Calendar.getInstance();
        Calendar time = Calendar.getInstance();
        date.setTime(datebox.getValue());
        time.setTime(timebox.getValue());
        time.set(date.get(Calendar.YEAR), date.get(Calendar.MONTH), date.get(Calendar.DAY_OF_MONTH));
        return time.getTime();
    }
647884
public static String formatDateDifference(Date d1, Date d2) {
		long[] td = DateHelper.getTimeDifference(d1, d2);
		if (td[0] > 0) {
			return td[0] + " day(s), " + td[1] + " hour(s)";
		}
		if (td[1] > 0) {
			return td[1] + " hour(s), " + td[2] + " minute(s)";
		}
		if (td[2] > 0) {
			return td[2] + " minute(s), " + td[3] + " second(s)";
		}
		return td[3] + " second(s)";
	}
580215
@Override
	public Time getTime(final int columnIndex, final Calendar cal) throws SQLException {
		return wrapped.getTime(columnIndex, cal);
	}