using System;
using System.Globalization;
using System.Windows.Data;

namespace BeWo.Converter
{
    public class Date2CalendarWeekStringConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (!(value is DateTime))
            {
                return null;
            }

            var lDate = (DateTime)value;
            var lCal = DateTimeFormatInfo.CurrentInfo.Calendar;

            // TODO Wochenbuchung wegmachen :-)
            return "Leistungen gleicher Zeit und Dauer in dieser Woche buchen";

            // return "Leistungen gleicher Zeit und Dauer in dieser Woche buchen ("
            // + lDate.GetLast(DayOfWeek.Monday).ToShortDateString()
            // + " - "
            // + lDate.GetNext(DayOfWeek.Sunday).ToShortDateString()
            // + ")";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}