-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added `MinimumYear` and `MaximumYear` properties to the `Holiday` base class. This allows defining the year range for which a holiday is valid. The defaults are a minimum year of 1 and a maximum year of 9999. - The `AddFixed` and `AddFloating` methods of the `HolidayCollection` class now return the added instance. - The `HolidayCollection` class will now only return a holiday date if the instance falls within the valid year range for the holiday definition. - The `AddStandardHolidays` method of the `HolidayCollection` class was updated to allow passing in a set of one or more additional holiday instances to add to the standard set. If none are specified, only the standard set is used.
- Loading branch information
1 parent
df7d80f
commit aefa24a
Showing
45 changed files
with
1,068 additions
and
574 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<topic id="3ebeed58-ecb5-475f-93c1-c9e0098ac5a0" revisionNumber="1"> | ||
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<introduction> | ||
<para>Release notes for version 2021.11.23.0.</para> | ||
</introduction> | ||
|
||
<!-- Ignore Spelling: Giménez --> | ||
<section> | ||
<content> | ||
<list class="bullet"> | ||
<listItem> | ||
<para>Added <codeInline>MinimumYear</codeInline> and <codeInline>MaximumYear</codeInline> properties | ||
to the <codeInline>Holiday</codeInline> base class. This allows defining the year range for which a holiday is | ||
valid. The defaults are a minimum year of 1 and a maximum year of 9999.</para> | ||
</listItem> | ||
|
||
<listItem> | ||
<para>The <codeInline>AddFixed</codeInline> and <codeInline>AddFloating</codeInline> methods of the | ||
<codeInline>HolidayCollection</codeInline> class now return the added instance.</para> | ||
</listItem> | ||
|
||
<listItem> | ||
<para>The <codeInline>HolidayCollection</codeInline> class will now only return a holiday date if the | ||
instance falls within the valid year range for the holiday definition.</para> | ||
</listItem> | ||
|
||
<listItem> | ||
<para>The <codeInline>AddStandardHolidays</codeInline> method of the | ||
<codeInline>HolidayCollection</codeInline> class was updated to allow passing in a set of one or more additional | ||
holiday instances to add to the standard set. If none are specified, only the standard set is used.</para> | ||
</listItem> | ||
|
||
<listItem> | ||
<para>Merged a change from Jorge Giménez to the <codeInline>Recurrence</codeInline> class that fixes | ||
a bug that caused incorrect results for a rule with a yearly frequency and only a By Month Day rule.</para> | ||
</listItem> | ||
</list> | ||
|
||
</content> | ||
</section> | ||
|
||
<relatedTopics> | ||
<link xlink:href="8885fe94-537b-45a2-84e9-112fa9c976ff" /> | ||
</relatedTopics> | ||
|
||
</developerConceptualDocument> | ||
</topic> |
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
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
// System : EWSoftware PDI Demonstration Applications | ||
// File : AssemblyInfo.cs | ||
// Author : Eric Woodruff ([email protected]) | ||
// Updated : 11/25/2020 | ||
// Note : Copyright 2004-2020, Eric Woodruff, All rights reserved | ||
// Updated : 11/23/2021 | ||
// Note : Copyright 2004-2021, Eric Woodruff, All rights reserved | ||
// | ||
// PDI library demos common assembly attributes | ||
// | ||
|
@@ -27,7 +27,7 @@ | |
// General assembly information | ||
[assembly: AssemblyProduct("EWSoftware Personal Data Interchange Library")] | ||
[assembly: AssemblyCompany("Eric Woodruff")] | ||
[assembly: AssemblyCopyright("Copyright \xA9 2003-2020, Eric Woodruff, All Rights Reserved")] | ||
[assembly: AssemblyCopyright("Copyright \xA9 2003-2021, Eric Woodruff, All Rights Reserved")] | ||
[assembly: AssemblyCulture("")] | ||
#if DEBUG | ||
[assembly: AssemblyConfiguration("Debug")] | ||
|
@@ -51,5 +51,5 @@ | |
// Day of release | ||
// Revision (typically zero unless multiple releases are made on the same day) | ||
// | ||
[assembly: AssemblyVersion("2020.11.25.0")] | ||
[assembly: AssemblyFileVersion("20.11.25.0")] | ||
[assembly: AssemblyVersion("2021.11.23.0")] | ||
[assembly: AssemblyFileVersion("21.11.23.0")] |
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 |
---|---|---|
|
@@ -2,9 +2,8 @@ | |
// System : EWSoftware PDI Demonstration Applications | ||
// File : PDIDatesTest.cs | ||
// Author : Eric Woodruff ([email protected]) | ||
// Updated : 11/19/2018 | ||
// Note : Copyright 2003-2018, Eric Woodruff, All rights reserved | ||
// Compiler: Visual C# | ||
// Updated : 11/22/2021 | ||
// Note : Copyright 2003-2021, Eric Woodruff, All rights reserved | ||
// | ||
// This is a console mode application that runs through a few simple configurations to test the basics in the | ||
// date utility, holiday, and recurrence classes. | ||
|
@@ -529,6 +528,7 @@ static void Main(string[] args) | |
holidays.AddFloating(DayOccurrence.Third, DayOfWeek.Monday, 1, 0, "Martin Luther King Day"); | ||
holidays.AddFloating(DayOccurrence.Third, DayOfWeek.Monday, 2, 0, "President's Day"); | ||
holidays.AddFloating(DayOccurrence.Last, DayOfWeek.Monday, 5, 0, "Memorial Day"); | ||
holidays.AddFixed(6, 19, true, "Juneteenth").MinimumYear = 2021; | ||
holidays.AddFixed(7, 4, true, "Independence Day"); | ||
holidays.AddFloating(DayOccurrence.First, DayOfWeek.Monday, 9, 0, "Labor Day"); | ||
holidays.AddFixed(11, 11, true, "Veteran's Day"); | ||
|
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
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 |
---|---|---|
|
@@ -2,9 +2,8 @@ | |
// System : EWSoftware PDI Demonstration Applications | ||
// File : Global.asax.cs | ||
// Author : Eric Woodruff ([email protected]) | ||
// Updated : 11/21/2018 | ||
// Note : Copyright 2004-2018, Eric Woodruff, All rights reserved | ||
// Compiler: Microsoft Visual C# | ||
// Updated : 11/21/2021 | ||
// Note : Copyright 2004-2021, Eric Woodruff, All rights reserved | ||
// | ||
// At application start up, a common set of time zones is loaded into the VCalendar.TimeZones collection and a | ||
// common set of holidays is loaded into the Recurrence.Holidays collection. | ||
|
@@ -74,7 +73,7 @@ protected void Application_Start(object sender, EventArgs e) | |
lock(((ICollection)Recurrence.Holidays).SyncRoot) | ||
{ | ||
if(Recurrence.Holidays.Count == 0) | ||
Recurrence.Holidays.AddStandardHolidays(); | ||
Recurrence.Holidays.AddStandardHolidays(new FixedHoliday(6, 19, true, "Juneteenth") { MinimumYear = 2021 }); | ||
} | ||
} | ||
} | ||
|
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 |
---|---|---|
|
@@ -2,9 +2,8 @@ | |
// System : EWSoftware PDI Demonstration Applications | ||
// File : HolidayTestForm.aspx.cs | ||
// Author : Eric Woodruff ([email protected]) | ||
// Updated : 11/22/2018 | ||
// Note : Copyright 2004-2018, Eric Woodruff, All rights reserved | ||
// Compiler: Microsoft Visual C# | ||
// Updated : 11/23/2021 | ||
// Note : Copyright 2004-2021, Eric Woodruff, All rights reserved | ||
// | ||
// This page is used to demonstrate the Holiday and date utility classes | ||
// | ||
|
@@ -48,7 +47,7 @@ protected void Page_Load(object sender, EventArgs e) | |
if(hc == null) | ||
{ | ||
hc = new HolidayCollection(); | ||
hc.AddStandardHolidays(); | ||
hc.AddStandardHolidays(new FixedHoliday(6, 19, true, "Juneteenth") { MinimumYear = 2021 }); | ||
Session["Holidays"] = hc; | ||
} | ||
|
||
|
@@ -105,7 +104,7 @@ protected void dgHolidays_ItemCommand(object source, DataGridCommandEventArgs e) | |
// Revert to the default set | ||
hc = (HolidayCollection)Session["Holidays"]; | ||
hc.Clear(); | ||
hc.AddStandardHolidays(); | ||
hc.AddStandardHolidays(new FixedHoliday(6, 19, true, "Juneteenth") { MinimumYear = 2021 }); | ||
|
||
dgHolidays.EditItemIndex = -1; | ||
dgHolidays.DataSource = hc; | ||
|
@@ -229,6 +228,8 @@ protected void dgHolidays_UpdateCommand(object source, DataGridCommandEventArgs | |
{ | ||
Month = cboMonth.SelectedIndex + 1, | ||
Description = ((TextBox)e.Item.FindControl("txtDescription")).Text, | ||
MinimumYear = Convert.ToInt32(((TextBox)e.Item.FindControl("txtMinimumYear")).Text), | ||
MaximumYear = Convert.ToInt32(((TextBox)e.Item.FindControl("txtMaximumYear")).Text), | ||
Occurrence = (DayOccurrence)((DropDownList)e.Item.FindControl("cboOccurrence")).SelectedIndex + 1, | ||
Weekday = (DayOfWeek)((DropDownList)e.Item.FindControl("cboDayOfWeek")).SelectedIndex, | ||
Offset = Convert.ToInt32(((TextBox)e.Item.FindControl("txtOffset")).Text) | ||
|
@@ -251,6 +252,8 @@ protected void dgHolidays_UpdateCommand(object source, DataGridCommandEventArgs | |
{ | ||
Month = cboMonth.SelectedIndex + 1, | ||
Description = ((TextBox)e.Item.FindControl("txtDescription")).Text, | ||
MinimumYear = Convert.ToInt32(((TextBox)e.Item.FindControl("txtMinimumYear")).Text), | ||
MaximumYear = Convert.ToInt32(((TextBox)e.Item.FindControl("txtMaximumYear")).Text), | ||
AdjustFixedDate = ((CheckBox)e.Item.FindControl("chkAdjustDate")).Checked, | ||
Day = Convert.ToInt32(((TextBox)e.Item.FindControl("txtDayOfMonth")).Text) | ||
}; | ||
|
@@ -335,6 +338,12 @@ protected void dgHolidays_ItemDataBound(object sender, DataGridItemEventArgs e) | |
|
||
cboMonth.SelectedIndex = hc[e.Item.ItemIndex].Month - 1; | ||
((TextBox)e.Item.FindControl("txtDescription")).Text = hc[e.Item.ItemIndex].Description; | ||
((TextBox)e.Item.FindControl("txtMinimumYear")).Text = | ||
((hc[e.Item.ItemIndex].MinimumYear < 1) ? 1 : (hc[e.Item.ItemIndex].MinimumYear > 9999) ? | ||
9999 : hc[e.Item.ItemIndex].MinimumYear).ToString(); | ||
((TextBox)e.Item.FindControl("txtMaximumYear")).Text = | ||
((hc[e.Item.ItemIndex].MaximumYear < 1) ? 1 : (hc[e.Item.ItemIndex].MaximumYear > 9999) ? | ||
9999 : hc[e.Item.ItemIndex].MaximumYear).ToString(); | ||
} | ||
} | ||
|
||
|
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 |
---|---|---|
|
@@ -231,6 +231,16 @@ | |
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.