package eu.europa.esig.dss.validation.process.qmatrix;

import java.util.Date;

import javax.xml.bind.DatatypeConverter;

public final class EIDASUtils {

	private EIDASUtils() {
	}

	/**
	 * Start date of the eIDAS regulation
	 */
	private final static Date EIDAS_DATE = DatatypeConverter.parseDateTime("2016-07-01T00:00:00.000Z").getTime();

	/**
	 * End of the grace period for eIDAS regulation
	 */
	private final static Date EIDAS_GRACE_DATE = DatatypeConverter.parseDateTime("2017-07-01T00:00:00.000Z").getTime();

	public static boolean isPostEIDAS(Date date) {
		return date != null && date.compareTo(EIDAS_DATE) >= 0;
	}

	public static boolean isPreEIDAS(Date date) {
		return date != null && date.compareTo(EIDAS_DATE) < 0;
	}

	public static boolean isPostGracePeriod(Date date) {
		return date != null && date.compareTo(EIDAS_GRACE_DATE) >= 0;
	}

}

@@ -212,32 +212,129 @@
 IDAS regulation%0A
+%09 * %0A%09 * Regulation was signed in Brussels : 1st of July 00:00 Brussels = 30th of June 22:00 UTC%0A
 %09 */%0A%09private fi
@@ -401,23 +401,23 @@
 (%222016-0
-7-01T00
+6-30T22
 :00:00.0
@@ -582,15 +582,15 @@
 17-0
-7-01T00
+6-30T22
 :00:

Fix eIDAS date (Brussels date is used)