/* * [OrangeShirtDay.java] * * Summary: calculate when Orange Shirt Day occurs. * * Copyright: (c) 2014-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 2014-10-05 initial version */ package com.mindprod.holidays; import com.mindprod.common18.BigDate; /** * calculate when Orange Shirt Day occurs. *

* In memory of the atrocities of the Canadian residential schools. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2014-10-05 initial version * @since 2014 */ public final class OrangeShirtDay extends HolInfo { /** * @inheritDoc */ public String getAuthority() { return "http://orangeshirtday.weebly.com/"; } /** * @inheritDoc */ public int getFirstYear( int base ) { return 2013; } /** * @inheritDoc */ public String getName() { return "Orange Shirt Day"; } /** * @inheritDoc */ public String getRule() { return "September 30."; } /** * @inheritDoc */ public int when( int year, boolean shift, int base ) { if ( !isYearValid( year, base ) ) { return BigDate.NULL_ORDINAL; } return shiftSatToFriSunToMon( BigDate.toOrdinal( year, 9, 30 ), shift ); } // end when. }