/* * [AboriginalDay.java] * * Summary: Calculate when Aboriginal day occurs. * * Copyright: (c) 2008-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: * 3.9 2008-06-21 add Aboriginal Day */ package com.mindprod.holidays; import com.mindprod.common18.BigDate; /** * Calculate when Aboriginal day occurs. * * @author Roedy Green, Canadian Mind Products * @version 4.2 2008-12-03 add World AIDS day * @since 2008-06-21 */ public final class AboriginalDay extends HolInfo { /** * @inheritDoc */ public String getAuthority() { return "http://www.cbc.ca/news/background/aboriginals/aboriginalday.html"; } /** * @inheritDoc */ public int getFirstYear( int base ) { return 1990; } /** * @inheritDoc */ public String getName() { return "Aboriginal Day"; } /** * @inheritDoc */ public String getRule() { return "June 21, not necessarily the summer solstice"; } /** * @inheritDoc */ public int when( int year, boolean shift, int base ) { if ( !isYearValid( year, base ) ) { return BigDate.NULL_ORDINAL; } return shiftSatToFriSunToMon( BigDate.toOrdinal( year, 6, 21 ), shift ); } // end when. }