namespace inutralia
{
    using inutralia.Utils;
    using System;
    using System.Globalization;
    using Xamarin.Forms;

    public class DateTransformator : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return DateUtilities.formatedDateFromTimeStamp((int)value, parameter != null ? parameter as string : culture.DateTimeFormat.ShortDatePattern);
        }

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