You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
813 B
38 lines
813 B
using System;
|
|
using System.Globalization;
|
|
|
|
namespace SharpCifs.Util.Sharpen
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
|