Ejemplo n.º 1
0
 /// <summary>
 /// Applies the day in month rule.
 /// </summary>
 /// <param name="dr">The dr.</param>
 /// <param name="dim">The dim.</param>
 /// <param name="dtCheckDate">The dt check date.</param>
 /// <param name="dtBase">The dt base.</param>
 /// <param name="observedDayDate">The dt observed day date.</param>
 internal static void ApplyDayInMonthRule(DateRule dr, DayInMonth dim, DateTime dtCheckDate, ref DateTime dtBase, ref DateTime observedDayDate)
 {
     // if we have a base holiday where the month and day have been specified
     if (dim.Month > 0 && dim.Day > 0)
     {
         dtBase = new DateTime(dtCheckDate.Year, dim.Month, dim.Day);
         ////Those that occur on a specified date but only on certain years
         //// NOTE**:These attributes don't yet exist but can easily be added to the XSD
         //if (hr.EveryXYearsSpecified)
         //{
         //    if (((dt.Year - hr.StartYear) % hr.EveryXYears) == 0)
         //    {
         //        h.Date = dt;
         //    }
         //}
     }
     // Derive and set business holiday (not necessarily the same as the holiday particularly if we are rolling
     // if the date falls on a weekend.
     // Here we would roll fwd to monday
     observedDayDate = ApplyDateRuleRollConvention(dr, dtBase);
 }
Ejemplo n.º 2
0
        private void OpenWorldBtn_Click(object sender, RoutedEventArgs e)
        {
            SecInMinutTxt.Text  = SecondsInMin.ToString();
            MinInHourTxt.Text   = MinInHour.ToString();
            HourInDayTxt.Text   = HourInDay.ToString();
            DayInMonthTxt.Text  = DayInMonth.ToString();
            MonthInYearTxt.Text = MonthInYear.ToString();
            DayNamesTxt.Text    = "";
            foreach (var item in DayName)
            {
                DayNamesTxt.Text += item;
                DayNamesTxt.Text += " ";
            }
            MonthNamesTxt.Text = "";
            foreach (var item in MonthName)
            {
                MonthNamesTxt.Text += item;
                MonthNamesTxt.Text += " ";
            }

            WorldSettingsGrid.Visibility = Visibility.Visible;
        }
Ejemplo n.º 3
0
 public override string GetDescription()
 {
     return(Month + " " + DayInMonth.ToOrdinalString());
 }