-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from softawaregmbh/netstandard2
netstandard2 upgrade
- Loading branch information
Showing
6 changed files
with
127 additions
and
113 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions
11
softaware.Holidays.Austria.Tests/softaware.Holidays.Austria.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using softaware.Holidays.Model; | ||
|
||
namespace softaware.Holidays.Austria | ||
{ | ||
/// <summary> | ||
/// Static class to extend the <see cref="softaware.Holidays.Generator"/> with a method specific for Austrian holidays. | ||
/// </summary> | ||
public static class Generator | ||
{ | ||
/// <summary> | ||
/// Generates Austrian holidays for a given year. | ||
/// </summary> | ||
/// <param name="generator">The generated that gets extended.</param> | ||
/// <param name="year">The year for which the holidays should be generated.</param> | ||
/// <returns>An <code>IEnumerable</code> of the generated holidays.</returns> | ||
public static IEnumerable<Holiday> ForAustria(this Holidays.Generator generator, int year) | ||
{ | ||
var holiday = generator.Create(year); | ||
|
||
yield return holiday.WithDate("Neujahr", month: 1, day: 1); | ||
yield return holiday.WithDate("Heilige Drei Könige", month: 1, day: 6); | ||
yield return holiday.WithDate("Valentinstag", month: 2, day: 14, workingDay: true); | ||
yield return holiday.BeforeEaster("Karfreitag", days: 2, workingDay: true); | ||
yield return holiday.AfterEaster("Ostersonntag", days: 0); | ||
yield return holiday.AfterEaster("Ostermontag", days: 1); | ||
yield return holiday.WithDate("Staatsfeiertag", month: 5, day: 1); | ||
yield return holiday.NthDayInMonth("Muttertag", 2, DayOfWeek.Sunday, 5, workingDay: true); | ||
yield return holiday.AfterEaster("Christi Himmelfahrt", days: 39); | ||
yield return holiday.AfterEaster("Pfingstsonntag", days: 49); | ||
yield return holiday.AfterEaster("Pfingstmontag", days: 50); | ||
yield return holiday.AfterEaster("Fronleichnam", days: 60); | ||
yield return holiday.NthDayInMonth("Vatertag", 2, DayOfWeek.Sunday, 6, workingDay: true); | ||
yield return holiday.WithDate("Mariä Himmelfahrt", month: 8, day: 15); | ||
yield return holiday.WithDate("Nationalfeiertag", month: 10, day: 26); | ||
yield return holiday.WithDate("Halloween", month: 10, day: 31, workingDay: true); | ||
yield return holiday.WithDate("Allerheiligen", month: 11, day: 1); | ||
yield return holiday.WithDate("Mariä Empfängnis", month: 12, day: 8); | ||
yield return holiday.WithDate("Heiligabend", month: 12, day: 24, workingDay: true); | ||
yield return holiday.WithDate("Christtag", month: 12, day: 25); | ||
yield return holiday.WithDate("Stefanitag", month: 12, day: 26); | ||
} | ||
} | ||
} | ||
using System; | ||
using System.Collections.Generic; | ||
using softaware.Holidays.Model; | ||
|
||
namespace softaware.Holidays.Austria | ||
{ | ||
/// <summary> | ||
/// Static class to extend the <see cref="softaware.Holidays.Generator"/> with a method specific for Austrian holidays. | ||
/// </summary> | ||
public static class Generator | ||
{ | ||
/// <summary> | ||
/// Generates Austrian holidays for a given year. | ||
/// </summary> | ||
/// <param name="generator">The generated that gets extended.</param> | ||
/// <param name="year">The year for which the holidays should be generated.</param> | ||
/// <returns>An <code>IEnumerable</code> of the generated holidays.</returns> | ||
public static IEnumerable<Holiday> ForAustria(this Holidays.Generator generator, int year) | ||
{ | ||
var holiday = generator.Create(year); | ||
|
||
yield return holiday.WithDate("Neujahr", month: 1, day: 1); | ||
yield return holiday.WithDate("Heilige Drei Könige", month: 1, day: 6); | ||
yield return holiday.WithDate("Valentinstag", month: 2, day: 14, workingDay: true); | ||
yield return holiday.BeforeEaster("Karfreitag", days: 2, workingDay: true); | ||
yield return holiday.AfterEaster("Ostersonntag", days: 0); | ||
yield return holiday.AfterEaster("Ostermontag", days: 1); | ||
yield return holiday.WithDate("Staatsfeiertag", month: 5, day: 1); | ||
yield return holiday.NthDayInMonth("Muttertag", 2, DayOfWeek.Sunday, 5, workingDay: true); | ||
yield return holiday.AfterEaster("Christi Himmelfahrt", days: 39); | ||
yield return holiday.AfterEaster("Pfingstsonntag", days: 49); | ||
yield return holiday.AfterEaster("Pfingstmontag", days: 50); | ||
yield return holiday.AfterEaster("Fronleichnam", days: 60); | ||
yield return holiday.NthDayInMonth("Vatertag", 2, DayOfWeek.Sunday, 6, workingDay: true); | ||
yield return holiday.WithDate("Mariä Himmelfahrt", month: 8, day: 15); | ||
yield return holiday.WithDate("Nationalfeiertag", month: 10, day: 26); | ||
yield return holiday.WithDate("Halloween", month: 10, day: 31, workingDay: true); | ||
yield return holiday.WithDate("Allerheiligen", month: 11, day: 1); | ||
yield return holiday.WithDate("Mariä Empfängnis", month: 12, day: 8); | ||
yield return holiday.WithDate("Heiligabend", month: 12, day: 24, workingDay: true); | ||
yield return holiday.WithDate("Christtag", month: 12, day: 25); | ||
yield return holiday.WithDate("Stefanitag", month: 12, day: 26); | ||
} | ||
} | ||
} |
68 changes: 36 additions & 32 deletions
68
softaware.Holidays.Austria/softaware.Holidays.Austria.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard1.0</TargetFramework> | ||
<Version>1.0.4</Version> | ||
<PackageProjectUrl>https://github.com/softawaregmbh/library-holidays</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/softawaregmbh/library-holidays</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageTags>softaware, Holiday</PackageTags> | ||
<Company>softaware gmbh</Company> | ||
<Authors>softaware gmbh</Authors> | ||
<PackageLicenseUrl>https://github.com/softawaregmbh/library-holidays/blob/master/LICENSE</PackageLicenseUrl> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<PackageIconUrl>https://secure.gravatar.com/avatar/d441f5a5514d2afce7da518a89f028d0?s=512&r=g&d=retro</PackageIconUrl> | ||
<Description>A simple .netstandard library for automatically generating holidays. | ||
This is the library for Austrian holidays.</Description> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<DocumentationFile>bin\Debug\netstandard1.0\softaware.Holidays.Austria.xml</DocumentationFile> | ||
<WarningsAsErrors>NU1605;CS1591</WarningsAsErrors> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<DocumentationFile>bin\Release\netstandard1.0\softaware.Holidays.Austria.xml</DocumentationFile> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\softaware.Holidays.Core\softaware.Holidays.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<Version>2.0.0</Version> | ||
<PackageProjectUrl>https://github.com/softawaregmbh/library-holidays</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/softawaregmbh/library-holidays</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageTags>softaware, Holiday</PackageTags> | ||
<Company>softaware gmbh</Company> | ||
<Authors>softaware gmbh</Authors> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<PackageIcon>package-icon.png</PackageIcon> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<Description>A simple .netstandard library for automatically generating holidays. This is the library for Austrian holidays.</Description> | ||
<PackageReleaseNotes>Update to netstandard2.0</PackageReleaseNotes> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<DocumentationFile>bin\Debug\netstandard1.0\softaware.Holidays.Austria.xml</DocumentationFile> | ||
<WarningsAsErrors>NU1605;CS1591</WarningsAsErrors> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<DocumentationFile>bin\Release\netstandard1.0\softaware.Holidays.Austria.xml</DocumentationFile> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\softaware.Holidays.Core\softaware.Holidays.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="..\Assets\package-icon.png" Link="package-icon.png" Pack="true" PackagePath="/" /> | ||
</ItemGroup> | ||
|
||
</Project> |
11 changes: 7 additions & 4 deletions
11
softaware.Holidays.Core.Tests/softaware.Holidays.Core.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard1.0</TargetFramework> | ||
<Version>1.0.3</Version> | ||
<PackageProjectUrl>https://github.com/softawaregmbh/library-holidays</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/softawaregmbh/library-holidays</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageTags>softaware, Holiday</PackageTags> | ||
<Company>softaware gmbh</Company> | ||
<Authors>softaware gmbh</Authors> | ||
<PackageLicenseUrl>https://github.com/softawaregmbh/library-holidays/blob/master/LICENSE</PackageLicenseUrl> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<PackageIconUrl>https://secure.gravatar.com/avatar/d441f5a5514d2afce7da518a89f028d0?s=512&r=g&d=retro</PackageIconUrl> | ||
<Description>A simple .netstandard library for automatically generating holidays. | ||
This is the core library.</Description> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<DocumentationFile>bin\Debug\netstandard1.0\softaware.Holidays.Core.xml</DocumentationFile> | ||
<WarningsAsErrors>NU1605;CS1591</WarningsAsErrors> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<DocumentationFile>bin\Release\netstandard1.0\softaware.Holidays.Core.xml</DocumentationFile> | ||
</PropertyGroup> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<Version>2.0.0</Version> | ||
<PackageProjectUrl>https://github.com/softawaregmbh/library-holidays</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/softawaregmbh/library-holidays</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageTags>softaware, Holiday</PackageTags> | ||
<Company>softaware gmbh</Company> | ||
<Authors>softaware gmbh</Authors> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<PackageIcon>package-icon.png</PackageIcon> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<Description>A simple .netstandard library for automatically generating holidays. This is the core library.</Description> | ||
<PackageReleaseNotes>Update to netstandard2.0</PackageReleaseNotes> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<DocumentationFile>bin\Debug\netstandard1.0\softaware.Holidays.Core.xml</DocumentationFile> | ||
<WarningsAsErrors>NU1605;CS1591</WarningsAsErrors> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<DocumentationFile>bin\Release\netstandard1.0\softaware.Holidays.Core.xml</DocumentationFile> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="..\Assets\package-icon.png" Link="package-icon.png" Pack="true" PackagePath="/" /> | ||
</ItemGroup> | ||
|
||
</Project> |