Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added changes for Australian Holidays #7

Merged
merged 5 commits into from
May 17, 2024

Conversation

KJ-Cox
Copy link
Contributor

@KJ-Cox KJ-Cox commented May 16, 2024

Modified FanartHandler.Holidays.xml to work with Australian holidays using AU.
This does require the user to add <entry name="HolidayCountry">AU</entry> to the <section name="FanartHandler"> of the FanartHandler.xml file in the "C:\ProgramData\Team MediaPortal\MediaPortal" folder.

@andrewjswan
Copy link
Owner

@KJ-Cox Please add new holidays as they occur (by date), i.e. in the file there are holidays in order and at the end Daylight Savings...

@andrewjswan andrewjswan self-assigned this May 16, 2024
@KJ-Cox
Copy link
Contributor Author

KJ-Cox commented May 16, 2024

@KJ-Cox Please add new holidays as they occur (by date), i.e. in the file there are holidays in order and at the end Daylight Savings...

New holidays sorted into date order

@andrewjswan
Copy link
Owner

DST Start:

private DateTime dststart(int y)
{
TimeZoneInfo timeZoneInfo = TimeZoneInfo.Local;
if (!timeZoneInfo.SupportsDaylightSavingTime )
{
return DateTime.MinValue;
}
TimeZoneInfo.AdjustmentRule[] adjustmentRules = timeZoneInfo.GetAdjustmentRules();
DateTime dst = this.GetDaylightSavingsStartDateForYear(adjustmentRules, y);
if (dst < this.startingDate)
{
return this.dststart(y + 1);
}
else
{
return dst;
}
}

@andrewjswan
Copy link
Owner

DST End:

private DateTime dstend(int y)
{
TimeZoneInfo timeZoneInfo = TimeZoneInfo.Local;
if (!timeZoneInfo.SupportsDaylightSavingTime )
{
return DateTime.MinValue;
}
TimeZoneInfo.AdjustmentRule[] adjustmentRules = timeZoneInfo.GetAdjustmentRules();
DateTime dst = this.GetDaylightSavingsEndDateForYear(adjustmentRules, y);
if (dst < this.startingDate)
{
return this.dstend(y + 1);
}
else
{
return dst;
}
}

@andrewjswan andrewjswan merged commit de26b78 into andrewjswan:master May 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants