Releases: qphl/Tools.WorkingDayService
v3.0.0 - Ownership Change
Ownership Transfer
As we are now working under Corsham Science, the package name, copyright information and other relevant metadata have been updated to reflect this fact.
Package Updates
The dev packages used to build and test the Tools.WorkingDayService
have been updated to their latest version, and the build script has been updated to output the package in the correct directory (as .Net Core 3 changed the relative path structure for build outputs). This includes the CodeStyle
package, which enforced much of the name change.
v3.0.0-RC1 - Ownership Change
Ownership Transfer
As we are now working under Corsham Science, the package name, copyright information and other relevant metadata have been updated to reflect this fact.
Package Updates
The dev packages used to build and test the Tools.WorkingDayService
have been updated to their latest version, and the build script has been updated to output the package in the correct directory (as .Net Core 3 changed the relative path structure for build outputs). This includes the CodeStyle
package, which enforced much of the name change.
v2.0.0 - Make `WorkingDayService` constructor internal
Made the WorkingDayService
constructor internal, forcing use of the WorkingDayServiceBuilder
, and updated the tests accordingly.
Also added an extra WorkingDayServiceBuilder
extension to use params
for non-working days in DaysOfTheWeekNonWorkingDaySource
.
Bugfix & Dependency Removal
- Fixed a bug (an invalid argument exception complaining about not having configured any sources) when building a working day service.
- Removed dependency on JSON.Net.
Initial Release
The Initial Release for the Working Day Service includes:
- The
WorkingDayService
& Related Builder- The
WorkingDayService
can be constructed with a range ofNonWorkingDaySources
using theWorkingDayServiceBuilder
. - The
WorkingDayService
provides methods (based on the configuredNonWorkingDaySources
) to:- Check whether a given
DateTime
is on a working day. - Check whether a given
DateTime
is on a non-working day. - Get the date of the next working day from a provided
DateTime
. - Get the date of the last working day before a provided
DateTime
. - Get the date once a provided number of working days have passed after a provided
DateTime
. - Get the date from which a provided number of working days have passed to reach a provided
DateTime
.
- Check whether a given
- The
- The abstract base class, and simple implementations of
NonWorkingDaySource
s.- Non-working day sources provide an virtual method to check whether a given date time is on a non-working day, and a method to check whether it is on a working day (simply returns
!IsNonWorkingDay(date)
). - The basic implementations of
NonWorkingDaySource
s included with this package are:- The
DayOfTheWeekNonWorkingDaySource
, which can be configured with a list ofDayOfWeek
s to consider non-working days. - The
StringNonWorkingDaySource
, which is a base implementation for theFileSource
andHttpSource
, and is configured with a method to build a state from a string, and a method to check whether a given day is on a non-working day based on the current state. - The
FileNonWorkingDaySource
, which works in the same way as aStringNonWorkingDaySource
, except it's passed a file path on initialization, where it gets the string to build it's state, and uses aFileWatcher
to keep it up to date. - The
HttpNonWorkingDaySource
, which works in the same way as aStringNonWorkingDaySource
, except it uses aHttpRequestMessage
to get the string to build the state with, and updates the current state on a provided interval.- An extension method is provided to set up a
HttpNonWorkingDaySource
which uses the UK Government's Bank Holiday JSON API.
- An extension method is provided to set up a
- The
- Non-working day sources provide an virtual method to check whether a given date time is on a non-working day, and a method to check whether it is on a working day (simply returns
Release Candidate 4
1.0.0-rc4 Updated namespacing
Release Candidate 3
1.0.0-rc3 Finalize dependency versions
Release Candidate 2
1.0.0-rc2 Fix package reference versions for Nuget.org
Release Candidate 1
1.0.0-rc1 Set up for building & nuget packaging