From 098384679c50962b477ff8418ccbf937f4143642 Mon Sep 17 00:00:00 2001 From: HappyLife2 <130459769+HappyLife2@users.noreply.github.com> Date: Sat, 27 Jan 2024 03:49:08 +0530 Subject: [PATCH] adds skip packaging option --- src/DateTimeExtensions/WorkingDaysExtensions.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/DateTimeExtensions/WorkingDaysExtensions.cs b/src/DateTimeExtensions/WorkingDaysExtensions.cs index 8b876cd5..893d591e 100644 --- a/src/DateTimeExtensions/WorkingDaysExtensions.cs +++ b/src/DateTimeExtensions/WorkingDaysExtensions.cs @@ -1,7 +1,7 @@ #region License // -// Copyright (c) 2011-2012, João Matos Silva +// Copyright (c) 2011-2012, Jo�o Matos Silva // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -80,7 +80,7 @@ public static DateTime AddWorkingDays(this DateTime day, int workingDays) /// The end day. /// The culture of working days to be used in the calculation. See for more information. /// the number of Workingdays in the range / - public static int GetWorkingDays(this DateTime from, DateTime to, WorkingDayCultureInfo workingDayCultureInfo) + public static int GetWorkingDays(this DateTime from, DateTime to, IWorkingDayCultureInfo workingDayCultureInfo) { var innerFrom = from < to ? from : to; var innerTo = from < to ? to : from; @@ -100,7 +100,9 @@ public static int GetWorkingDays(this DateTime from, DateTime to, WorkingDayCult /// the number of Workingdays in the range / public static int GetWorkingDays(this DateTime from, DateTime to) { - return GetWorkingDays(from, to, new WorkingDayCultureInfo()); + var workingDayCultureInfo = new WorkingDayCultureInfo(); + + return GetWorkingDays(from, to, workingDayCultureInfo); } ///