/* * [CreationismDay.java] * * Summary: calculate when the anniversary of the the creation of earth occurs, according to Creationists. * * Copyright: (c) 2010-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2010-10-23 initial version */ package com.mindprod.holidays; import com.mindprod.common18.BigDate; /** * calculate when the anniversary of the the creation of earth occurs, according to Creationists. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2010-10-23 initial version * @since 2010 */ public final class CreationismDay extends HolInfo { /** * @inheritDoc */ public String getAuthority() { return "James Ussher, Church of Ireland Archbishop of Armagh and Primate of All Ireland"; } /** * @inheritDoc */ public int getFirstYear( int base ) { return -4004; // according to Ussher, the world was created 4004-10-23BC. } /** * @inheritDoc */ public String getName() { return "Creationism Day"; } /** * @inheritDoc */ public String getRule() { return "October 23"; } /** * @inheritDoc */ public int when( int year, boolean shift, int base ) { if ( !isYearValid( year, base ) ) { return BigDate.NULL_ORDINAL; } return shiftSatToFriSunToMon( BigDate.toOrdinal( year, 10, 23 ), shift ); } // end when. }