using System;
using System.Threading;

namespace Quadarax.Foundation.QConsole.Value
{
    public class DateTimeValue : DateValue
    {

        public DateTimeValue() : base()
        {

        }
        public DateTimeValue(DateTime value, string dateTimeFormat) : base(value, dateTimeFormat)
        {
        }
        public DateTimeValue(DateTime value) : base(value)
        {
            _dateformat = Thread.CurrentThread.CurrentUICulture.DateTimeFormat.ShortDatePattern + " " +  Thread.CurrentThread.CurrentUICulture.DateTimeFormat.ShortTimePattern;
        }

        public override string AsString()
        {
            return HasValue ? Get().ToString() : string.Empty;
        }
    }
}
