Skip to content

Commit

Permalink
cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Mar 24, 2024
1 parent 67a6671 commit bf912dd
Show file tree
Hide file tree
Showing 80 changed files with 1 addition and 89 deletions.
2 changes: 0 additions & 2 deletions src/Nager.Date/HolidayProviders/ArmeniaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public ArmeniaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{
var easterSunday = this._catholicProvider.EasterSunday(year);

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/AustriaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public IDictionary<string, string> GetSubdivisionCodes()
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/BeninHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public BeninHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

//TODO: Add islamic public holidays

var holidaySpecifications = new List<HolidaySpecification>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public IDictionary<string, string> GetSubdivisionCodes()
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/BotswanaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public BotswanaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var thirdMondayInJuly = DateHelper.FindDay(year, Month.July, DayOfWeek.Monday, Occurrence.Third);

var holidaySpecifications = new List<HolidaySpecification>
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/BulgariaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public BulgariaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

//var newYearDay = new DateTime(year, 1, 1).Shift(saturday => saturday.AddDays(2), sunday => sunday.AddDays(1));
//var liberationDay = new DateTime(year, 3, 3).Shift(saturday => saturday.AddDays(2), sunday => sunday.AddDays(1));
//var saintGeorgesDay = new DateTime(year, 5, 6).Shift(saturday => saturday.AddDays(2), sunday => sunday.AddDays(1));
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/CanadaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public IDictionary<string, string> GetSubdivisionCodes()
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var thirdMondayInFebruary = DateHelper.FindDay(year, Month.February, DayOfWeek.Monday, Occurrence.Third);
var mondayOnOrBeforeMay24 = DateHelper.FindDayBefore(year, Month.May, 25, DayOfWeek.Monday);
var firstMondayInAugust = DateHelper.FindDay(year, Month.August, DayOfWeek.Monday, Occurrence.First);
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/ChinaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(in
//TODO: Provider incomplete
//Tomb-Sweeping-Day is invalid (5th solar term)


var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public CostaRicaHolidayProvider(ICatholicProvider catholicProvider) : base(Count
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/CroatiaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public CroatiaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/CubaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public CubaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public CzechRepublicHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{


var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/DenmarkHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public DenmarkHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var easterSunday = this._catholicProvider.EasterSunday(year);

var holidaySpecifications = new List<HolidaySpecification>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public DominicanRepublicHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{


var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/EcuadorHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public EcuadorHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var easterSunday = this._catholicProvider.EasterSunday(year);

var holidaySpecifications = new List<HolidaySpecification>
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/EgyptHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ internal sealed class EgyptHolidayProvider() : AbstractHolidayProvider(CountryCo
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
3 changes: 0 additions & 3 deletions src/Nager.Date/HolidayProviders/ElSalvadorHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ public ElSalvadorHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var easterSunday = this._catholicProvider.EasterSunday(year);

//TODO: Add Holy Week / Easter bad documentation on wikipedia

var holidaySpecifications = new List<HolidaySpecification>
Expand Down
2 changes: 0 additions & 2 deletions src/Nager.Date/HolidayProviders/EstoniaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public EstoniaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{


var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/FinlandHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public FinlandHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var midsummerEve = DateHelper.FindDay(year, Month.June, 19, DayOfWeek.Friday);
var midsummerDay = DateHelper.FindDay(year, Month.June, 20, DayOfWeek.Saturday);
var allSaintsDay = DateHelper.FindDayBetween(year, 10, 31, year, 11, 6, DayOfWeek.Saturday);
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/FranceHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public IDictionary<string, string> GetSubdivisionCodes()
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/GabonHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public GabonHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/GambiaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public GambiaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

//TODO: Add islamic public holidays

var holidaySpecifications = new List<HolidaySpecification>
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/GeorgiaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public GeorgiaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/GermanyHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public IDictionary<string, string> GetSubdivisionCodes()
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public GibraltarHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var secondMondayInMarch = DateHelper.FindDay(year, Month.March, DayOfWeek.Monday, Occurrence.Second);
var lastMondayInMay = DateHelper.FindLastDay(year, Month.May, DayOfWeek.Monday);
var thirdMondayInJune = DateHelper.FindDay(year, Month.June, DayOfWeek.Monday, Occurrence.Second);
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/GrenadaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public GrenadaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var firstMondayInAugust = DateHelper.FindDay(year, Month.August, DayOfWeek.Monday, Occurrence.First);

var holidaySpecifications = new List<HolidaySpecification>
Expand Down
2 changes: 0 additions & 2 deletions src/Nager.Date/HolidayProviders/GuatemalaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public GuatemalaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{
var easterSunday = this._catholicProvider.EasterSunday(year);

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/GuernseyHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public GuernseyHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var lastMondayInMay = DateHelper.FindLastDay(year, Month.May, DayOfWeek.Monday);
var lastMondayInAugust = DateHelper.FindLastDay(year, Month.August, DayOfWeek.Monday);

Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/GuyanaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public GuyanaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var firstMondayInJuly = DateHelper.FindDay(year, Month.July, DayOfWeek.Monday, Occurrence.First);

var holidaySpecifications = new List<HolidaySpecification>
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/HongKongHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public HongKongHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var observedRuleSet = new ObservedRuleSet
{
Sunday = date => date.AddDays(1)
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/HungaryHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public HungaryHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/IcelandHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public IcelandHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var firstDayOfSummer = DateHelper.FindDay(year, Month.April, 19, DayOfWeek.Thursday);
var firstMondayInAugust = DateHelper.FindDay(year, Month.August, DayOfWeek.Monday, Occurrence.First);

Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/IrelandHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public IrelandHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var firstMondayInMay = DateHelper.FindDay(year, Month.May, DayOfWeek.Monday, Occurrence.First);
var firstMondayInJune = DateHelper.FindDay(year, Month.June, DayOfWeek.Monday, Occurrence.First);
var firstMondayInAugust = DateHelper.FindDay(year, Month.August, DayOfWeek.Monday, Occurrence.First);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public IsleOfManHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var observedRuleSet1 = new ObservedRuleSet
{
Saturday = date => date.AddDays(2),
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/ItalyHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public ItalyHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/JapanHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public JapanHolidayProvider() : base(CountryCode.JP)
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var secondMondayInJanuary = DateHelper.FindDay(year, Month.January, DayOfWeek.Monday, Occurrence.Second);
var thirdMondayInJuly = DateHelper.FindDay(year, Month.July, DayOfWeek.Monday, Occurrence.Third);
var thirdMondayInSeptember = DateHelper.FindDay(year, Month.September, DayOfWeek.Monday, Occurrence.Third);
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/JerseyHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public JerseyHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var firstMondayInMay = DateHelper.FindDay(year, Month.March, DayOfWeek.Monday, Occurrence.First);
var lastMondayInMay = DateHelper.FindLastDay(year, Month.May, DayOfWeek.Monday);
var lastMondayInAugust = DateHelper.FindLastDay(year, Month.August, DayOfWeek.Monday);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public KazakhstanHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

//TODO: Last day of Hajj -> Islamic calendar

var holidaySpecifications = new List<HolidaySpecification>
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/LatviaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public LatviaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var secondSundayInMay = DateHelper.FindDay(year, Month.May, DayOfWeek.Sunday, Occurrence.Second);

var holidaySpecifications = new List<HolidaySpecification>
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/LesothoHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public LesothoHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public LithuaniaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public LuxembourgHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public MacedoniaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public MadagascarHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/MaltaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public MaltaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
1 change: 0 additions & 1 deletion src/Nager.Date/HolidayProviders/MoldovaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public MoldovaHolidayProvider(
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var lastMondayInMay = DateHelper.FindLastDay(year, Month.August, DayOfWeek.Monday);

var holidaySpecifications = new List<HolidaySpecification>
Expand Down
3 changes: 1 addition & 2 deletions src/Nager.Date/HolidayProviders/MongoliaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Nager.Date.HolidayProviders
{
/// <summary>
/// Mongoli HolidayProvider
/// Mongolia HolidayProvider
/// </summary>
internal sealed class MongoliaHolidayProvider : AbstractHolidayProvider
{
Expand All @@ -19,7 +19,6 @@ public MongoliaHolidayProvider() : base(CountryCode.MN)
/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

//TODO:Add lunar calendar support
//TODO:Add Mongolian calendar support

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(in
//Muslim holidays
//Jewish holidays


var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
Expand Down
Loading

0 comments on commit bf912dd

Please sign in to comment.