Date, Calendar, TimeZone ComponentThe Date, Calendar, TimeZone Component is a non-visual .NET component that extends the .NET Framework classes DateTime, TimeSpan and TimeZone with powerful functions which do not exist in the basic classes.
You can easily set dates, times, time zones, daylight saving times, weeks and weekdays, convert them from and to other formats, calculate specific days like 4th Monday in April or calculate holidays like Easter, add them, subtract them and a lot more in your application.
This component was developed in C#, supports all .NET languages including C# and VB.NET, is compliant with the Common Language Specification (CLS) and is runtime royalty free.
What's new in Version v4.0
- Migrated to .NET 2.0 (from .NET 1.1).
RequirementsThe component is a small .NET-DLL (100 KB) built with C#. This component requires the Microsoft .NET Framework 2.0 or higher.
SoftwareDownload latest version (self-extracting zip file).
Free for private use and commercial use.
DetailsNew structure SMDateTime extends DateTime with a timezone. All members from SMDateTime work like the members from DateTime except that they calculate relating to the internal time zone and relating to the daylight saving time period if available. It is not possible to set a time to the hour that does not exist when daylight saving time begins. SMDateTime supports hour b when daylight saving time ends.
New structure SMTimeSpan which suits to structure SMDateTime.
New class SMTimeZone which contains the information for a timezone including daylight saving time period. About 75 timezones from Windows are supported. You can add, change and remove timezones.
- New Members: General
- ToStringRaw, ToStringRawUtc
- New Members: Constructors
- with TimeZone
- with TimeZone and with HourB
- New Members: Conversion (Cast)
- Conversions between SMDateTime and DateTime
- Conversions between SMTimeSpan and TimeSpan
- New Members: Set
- SetDateTime, SetDate, SetTimeOfDay
- SetTimeZone, SetHourB, SetYear, SetMonth, SetDay, SetHour, SetMinute, SetSecond, SetMillisecond, SetNano100
- New Members: SerialDay
- New Members: DayOfWeek
- PrevDayOfWeek, NextDayOfWeek
- SetDayOfWeekBefore, SetDayOfWeekBeforeEqual, SetDayOfWeekAfter, SetDayOfWeekAfterEqual, SetDayOfWeekNearestEqual
- New Members: Week
- New Members: Easter
- New Members: Add, Subtract
- PrevDay, NextDay, LastDay
- SubtractYear, SubtractMonth
- New Members: Conversion
- FromDosDateTime, ToDosDateTime
- FromUnixTime, ToUnixTime
- FromSystemTime, ToSystemTime
- New Members: TimeZone
- UtcTimeZone, CurrentTimeZone
- AddTimeZone, RemoveTimeZone
- TimeZoneInformation, IsDaylightSavingTime, GetDaylightChanges, HasDaylightChanges
- SetTimeZone, SetHourB, TimeZone, HourB