32 lines
884 B
C#
32 lines
884 B
C#
using BeWo.Service.Plugins;
|
|
using BS.Shared.DataContracts;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SeWo.Service
|
|
{
|
|
public class CustomVacationService : VacationService
|
|
{
|
|
public override List<FeiertagDC> GetFeiertage(int year, string bundesland)
|
|
{
|
|
var list = base.GetFeiertage(year, bundesland);
|
|
|
|
if (year >= 2025)
|
|
list.Add(new FeiertagDC() { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
|
|
|
|
return list;
|
|
}
|
|
|
|
public override decimal GetFeiertagsFaktor(DateTime start)
|
|
{
|
|
if (start.Year >= 2025 && start.Month == 12 && (start.Day == 24 || start.Day == 31))
|
|
return 0.5m;
|
|
else
|
|
return base.GetFeiertagsFaktor(start);
|
|
}
|
|
}
|
|
}
|