@Override
	public ElectionState getElectionState() {
		// gets the current date
		Date date = new Date();
		if (openNominationsDate == null || date.before(openNominationsDate))
			return ElectionState.NOT_STARTED;
		else if (date.before(startDate))
			return ElectionState.NOMINATIONS_OPEN;
		else if (date.before(endDate))
			return ElectionState.STARTED;
		else if (!published)
			return ElectionState.ENDED;
		else 
			return ElectionState.PUBLISHED;
	}