jellyfin/Emby.Common.Implementations/IO/SharpCifs/Util/Sharpen/DateFormat.cs

38 lines
932 B
C#
Raw Normal View History

2017-04-02 00:36:06 +00:00
using System;
using System.Globalization;
namespace SharpCifs.Util.Sharpen
{
2017-06-21 06:46:57 +00:00
public abstract class DateFormat
{
public const int Default = 2;
public static DateFormat GetDateTimeInstance(int dateStyle, int timeStyle)
{
return GetDateTimeInstance(dateStyle, timeStyle, CultureInfo.CurrentCulture);
}
public static DateFormat GetDateTimeInstance(int dateStyle, int timeStyle, CultureInfo aLocale)
{
return new SimpleDateFormat(aLocale.DateTimeFormat.FullDateTimePattern, aLocale);
}
TimeZoneInfo _timeZone;
public abstract DateTime Parse(string value);
public TimeZoneInfo GetTimeZone()
{
return _timeZone;
}
public void SetTimeZone(TimeZoneInfo timeZone)
{
this._timeZone = timeZone;
}
public abstract string Format(DateTime time);
}
2017-04-02 00:36:06 +00:00
}