using System;
using System.Threading;

namespace Quadarax.Foundation.Core.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 = System.Threading.Thread.CurrentThread.CurrentUICulture.DateTimeFormat.ShortDatePattern + " " +  System.Threading.Thread.CurrentThread.CurrentUICulture.DateTimeFormat.ShortTimePattern;
        }

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