DTime+ v3.32 A collection
of Date/Time Classes for C++
Description
DTime+ is a collection of classes & functions designed to ease the C++ programmers’
burden when handling date and time values. If like me, having taken a look at the
built in MFC classes CTime and CTimeSpan or the OLE based COleDateTime and COleDateTimeSpan
classes in Visual Studio, you decided they did not meet your requirements, and you
decided to write your own super-duper date and time classes, but deadlines were
looming, then look no further. The original basis of the algorithms for conversion
from the Julian and Gregorian calendar to the underlying storage was adopted from
an article by Peter J.G. Meyer for the March 1993 issue of Dr Dobbs Journal. You
can find the article online at
http://www.drdobbs.com/cpp/julian-and-gregorian-calendars/184408959.
As of v3.21, the code for the Julian and Gregorian calendar has been reworked to
now be based on Howard Hinnant's algorithms at
http://howardhinnant.github.io/date_algorithms.html.
The algorithm used to determine the date of Easter Sunday is taken from
the book ‘Astronomical Algorithms’ by Jean Meeus. The algorithms for the Moslem
(Islamic) and Hebrew calendar are provided by the book "Calendrical
Calculations, The Millenium Edition" by Edward M. Reingold and Nachum
Dershowitz. Calendrical Calculations has always been a favourite topic of the
author and was in fact some of the first code which I published on the web back
in the mid 90's. Originally the code was shareware but I've now decided to make
it freeware in the hope that more people will find it useful in their day to day
projects. As of v3.20, the classes are fully supported on non Windows platforms.
All the code has been carefully reviewed and reworked to support this. For this
release the code has been tested on VC 2017/2019 & 2022 on Windows and on Ubuntu using gcc, cmake and Code::Blocks.
Features
- The classes provided are implemented as a C++ template based class framework.
- The code fully supports the Gregorian, Julian and Moslem (Islamic) and Hebrew
calendars. DTime+ also supports proleptic versions of all of these calendars.
You can also easily convert between all the calendar types. The 4 most common
forms of the Moslem Arithmetic calendar are supported namely the 15th and 16th
year leap year rules as well as the Civil Epoch (16 July 622 C.E. O.S) and the
Astronomical Epoch (15 July 622 C.E. O.S).
- As of v3.23, the classes are fully supported on non Windows platforms. All
the code has been carefully reviewed and reworked to support this. For this
release the code has been tested on VC 2017 on Windows and on Ubuntu 18.04.1 LTS
using gcc 6.2.0, cmake 3.5.2 and Code::Blocks 16.01.
- When compiling for desktop environments on Visual Studio, the classes stick
very closely to the MFC class structures and provide routines to map from CTime,
COleDateTime, COleDateTimeSpan and CTimeSpan. Mappings are also available to
convert to and from Win32 SDK date and time structures.
- The classes do not rely on the ‘C’ runtime library like the
way CTime does. The classes only use the 'C' runtime to get the current UTC
and local times and nothing else. The classes use of UTC / Local is much less
vague than CTime which performs automatic mappings which can confuse even the
most experienced developer.
- A number of date / time classes are provided namely CDate, CLTimeSpan,
CLLTimeSpan, CLTimeOfDay, CLLTimeOfDay, CLDate & CLLDate.
- Methods are provided to integrate with the date time UI controls on Windows.
- Includes comprehensive support for Holidays, Christian Saints Days, National
Holidays, US Specific Holidays, Christian Feast Days, Moslem and Hebrew holidays.
- Tight integration with the Win32 NLSAPI when compiled for desktop environments
on Visual Studio. For example all the day of week and month strings are taken
from Win32. This means that if DTime+ is used on an international version of
Windows, the days of week etc. will be in the local language.
- Format functions with a superset of the functionality provided by CTime/CTimeSpan::Format.
- When compiled for desktop environments on Visual Studio, the Format functions
are also able to display a date or time according to display characteristics
as specified in the Windows Control Panel.
- The CDate class provides a resolution of 1 day and uses a int32_t to represent
the count of days. Its range is valid for roughly the whole range of a int32_t
i.e. +/- 2 billion days (or just under 5.5 million years!) from the current
era.
- The CLTimeOfDay class represents a time of day i.e. 00:00:00 to 23:59:60
and provides a resolution of 1 second.
- The CLLTimeOfDay class represents a time of day i.e. 00:00:00 to 23:59:60
and uses a double for storage.
- The CLTimeSpan class represents the time interval between two CLDate instances
and provides a resolution of 1 second.
- The CLLTimeSpan class represents the time interval between two CLLDate instances
and uses a double for storage.
- The CLDate class represents the composite of a date and a time of day together
and provides a granularity of 1 second. As with CDate, the full range of a int32_t
is valid i.e. +/- 5.5 million years. This is ‘quite’ larger than
the roughly 60-year time span for CTime (assuming you are not using the 64 bit
CTime data type available in Visual Studio 2005) and the 100 CE - 9999CE time
span for COleDateTime. Using CLDate means that you can represent +/- 5.5 million
years from the current era with a resolution of 1 second.
- The CLLDate class represents the composite of a date and a time of day together
and stores a count of seconds as a double thus providing sub-second accuracy.
For the year range -2000000 to 2000000, the worst case resolution is 0.008
seconds. The change in resolution depending on what year you are
representing occurs due to how a double is represented using IEEE 754
floating point format.
- All classes are fully Unicode enabled and Unicode build configurations are
provided in the sample apps provided.
- All classes and defines are declared in a C++ namespace called DTimePlus.
This helps reduce pollution of the C++ global namespace.
- If using Visual Studio as your development environment, then the classes
are only supported on VC 2017 or later. On non Windows platforms, any recent
copy of GCC should do.
The enclosed zip file contains the source
code, a simple VC 2017 console based application which exercises all the class and
a VC 2017 CDialog based application to exercise the UI support provided by the class
framework.
Copyright
- You are allowed to include the source code in any product (commercial, shareware,
freeware or otherwise) when your product is released in binary form.
- You are allowed to modify the source code in any way you want except you
cannot modify the copyright details at the top of each module.
- If you want to distribute source code with your application, then you are
only allowed to distribute versions released by the author. This is to maintain
a single distribution point for the source code.
Updates
v3.32 (30 October 2023)
- Made the operator- methods of CLDate const.
- Made the operator- methods of CLLDate const.
- Made CLDate::GetAsTM const.
v3.31 (3 June 2023)
- Updated copyright details.
- Updated module to indicate that it needs to be compiled using
/std:c++17. Thanks to Martin Richter for reporting this issue.
v3.30 (22 May 2022)
- Updated copyright details.
- Updated the code to use C++ uniform initialization for all variable
declarations.
v3.29 (29 December 2021)
- Updated copyright details
- Fixed more Clang-Tidy static code analysis warnings in the code.
v3.28 (21 May 2020)
- Fixed a bug in CLTimeSpan::Format where a break statement was placed in
the wrong location.
v3.27 (16 May 2020)
- Updated copyright details
- Fixed Clang-Tidy static code analysis warnings in the code.
v3.26 (17 December 2019)
- Fixed various Clang-Tidy static code analysis warnings in the code.
- Updated initialization of various structs to use C++ 11 list
initialization.
v3.25 (13 October 2019)
- Fixed a number of compiler warnings when the code is compiled with VS
2019 Preview
v3.24 (8 June 2019)
- Updated copyright details
- Updated the code to clean compile on VC 2019
v3.23 (13 November 2018)
- Fixed a number of C++ core guidelines compiler warnings. These changes mean
that the code will now only compile on VC 2017 or later on Windows.
- Replaced enum with enum class throughout the codebase.
- The code now allows construction of a CLTimeOfDay and CLLTimeOfDay which
represents a time of day of 23:59:60 which occurs when a UTC leap second
occurs. Please note that if your OS exposes the concept of a leap second,
then DTime+ will be able to accept this value, but roundtripping back to
hours, minutes and seconds will give back midnight for the next day. Also
note that timespan calculations will ignore leap seconds. If you would like
to accurately calculate timespans taking into account leap seconds, then
please see the author's AA+ framework at
http://www.naughter.com/aa.html
v3.22 (2 January 2018)
- Updated copyright details
- Fix compile problems in CLTimeOfDay::GetWindowsFormatString in VC 2017
- Removed defunct dmod method.
- Fixed a bug in CDate::GetWindowsFormatString where it was calling
a non existent String::GetLength method
- Made CLDate::GetWindowsFormatString method publicly accessible
- Made layout of CLTimeSpan::GetWindowsFormatString parameters consistent
with the other GetWindowsFormatString implementations.
- Fixed a bug in CLTimeSpan::GetWindowsFormatString related to leading
zeros for the hour value.
- Replaced GetLocaleInfo Win32 API call with GetLocaleInfoEx.
- Replaced GetDateFormat Win32 API call with GetDateFormatEx.
- Replaced GetTimeFormat Win32 API call with GetTimeFormatEx.
- Introduced a new CLLTimeOfDay class which represents a time of day as a
double.
- Introduced a new CLLDate class which represents a time stamp as a
double. This provides a sub second accuracy unlike CLDate which only
provides an accuracy of 1 second.
- Introduced a new CLLTimeSpan class which represents the time difference
between two CLLDate instances.
v3.21 (20 December 2016)
- Optimized the CGregorianLeapFunctor::operator() method per the information
at https://howardhinnant.github.io/date_algorithms.html#is_leap.
- Optimized the CGregorianLeapFunctor::operator() method per the information
at https://howardhinnant.github.io/date_algorithms.html#is_leap.
- Removed the weekday & wYearday variables from the DateS struct. The
DateS struct now contains just the Year, Month & Day triplet.
- Renamed the GetDate method to "NumToDMY"
- Reimplemented the CJulianGregorianCalendar::DaysInMonth method per the information
at
https://howardhinnant.github.io/date_algorithms.html#last_day_of_month.
- Reimplemented the CGregorianCalendar::DMYToNum method per the information
at
https://howardhinnant.github.io/date_algorithms.html#days_from_civil.
- Reimplemented the CGregorianCalendar::NumToDMY method per the information
at
https://howardhinnant.github.io/date_algorithms.html#civil_from_days.
- Following all the optimizations in this release, the time taken to round
trip one Gregorian date has been reduced from 60ns to 35ns on my 3.2 Ghz CoreI7
965 processor. This corresponds to a 70% speedup compared to v3.20.
- Following all the optimizations in this release, the time taken to round
trip one Julian date has been reduced from 49ns to 28ns on my 3.2 Ghz CoreI7
965 processor. This corresponds to a 75% speedup compared to v3.20.
- Fixed an integer overflow bug in the CMoslemCalendar*::NumToDMY methods.
This bug was found while testing moslem dates from the year -2000000 to 2000000
in the updated test app. In fact the Gregorian, Julian, Moslem & Hebrew
calendars are now exercised from years -2000000 to 2000000 by the test app.
v3.20 (6 December 2016)
- Updated copyright details
- Removed all usage of CString from the code and replaced with std::[w]string.
- Replaced all occurrences of WORD with uint16_t throughout the code
- Replaced all occurrences of DWORD with uint32_t throughout the code
- Replaced all occurrences of ASSERT, AFXASSUME, TRACE & VERIFY with non
MFC dependent implementations
- Replaced all occurrences of long with int32_t throughout the code
- Renamed the DMYToLong method to "DMYToNum"
- Optimized the elements of the static lookup tables in CJulianCalendar::DMYToNum &
CJulianCalendar::GetDate
- Replaced all occurrences of NULL with nullptr throughout the code. This
does mean that the classes now require at least VC 2010 if you are going to
use a Microsoft compiler.
- Reimplemented CDate::CurrentSystemDate to just use the C runtime.
- Reimplemented CDate::CurrentLocalDate to just use the C runtime.
- Optimized the CDate::Set method which takes a COleDateTime parameter
- Optimized the CLDate::Set method which takes a COleDateTime parameter
- Fixed a bug in the validation code of the CDate::Set method which takes
a "WeekOfMonth" parameter.
- Fixed a bug in CJulianGregorianHolidays::EasterMonday where it returned
EasterSaturday by mistake
- Fixed all typos of "occurrences" throughout code and documentation
- Optimized the CDate::Set method which takes a CTime parameter
- Optimized the CLDate::Set method which takes a CTime parameter
v3.10 (26 October 2014)
- Updated copyright details.
- The classes and test app have been updated to require VC 2008 or later.
- Fix arithmetic bugs in a number of the CLDate::Set methods related to the
calculation of m_nSeconds.
- Updated code to clean compile with /analyze.
- CJulianGregorianHolidays::StStephensDays has been renamed to StStephensDay.
- Made improvements to the HewbrewOccurencesInGregorianYear method including
use of std::vector for collection array.
- Made improvements to the MoslemOccurencesInGregorianYear method including
use of std::vector for collection array.
- Addition of a number of new methods in the CJulianGregorianHolidays class
including CanadaThanksgivingDay & EasterMonday.
- Updated the test app to run more tests on the various DTime+ classes.
- Fixed a bug in CLTimeOfDay::GetAMPMString related to when PM kicks in.
- Fix arithmetic bugs in CLDate::GetCDate. Thanks to Zhen-dong Chen for reporting
these issues.
- Fix arithmetic bugs in CLDate::GetCLTimeOfDay. Thanks to Zhen-dong Chen
for reporting these issues.
- The sample app now generates the file for testing MFC persistence in the
temp directory to avoid UAC access denied issues on the root directory of the
C drive.
v3.09 (13 April 2007)
- Updated copyright details.
- Updated sample apps to clean compile on VC 2005
- Fixed a bug in CDate::Set(const CTime& ctime, ...) and CLDate& CLDate::Set
which incorrectly used GetGmtTm instead of GetLocalTm. Thanks to Martin Copland
for reporting this bug.
v3.08 (2 July 2006)
- Updated the code to clean compile on VC 2005
- Code now uses new C++ style casts rather than old style C casts where necessary.
v3.07 (30 May 2006)
- Added support for Rosh HaShanah 2
- Renamed CSimhatTorahFunctor to CCSimhatTorahOutsideIsraelFunctor
- Renamed CPassoverFunctor to CPesachFunctor
- Renamed CEndingOfPassoverFunctor to CShviiPesachFunctor
- Added support for Yom Ha'atzmaut
- Added support for Erev Pesach
- Added support for Ta'anit Bechorim
- Added support for Pesach Shenni
- Added support for Yom Yerushalaiym
- Renamed to CHoshahaRabbaFunctor to CHoshanahRabahFunctor. All of these updates
for the Hebrew calendar for v3.07 are thanks to Itamar Syn-Hershko.
v3.06 (29 May 2006)
- Further performance optimizations for the core CJulianCalendar algorithms.
There is a 3% increase in performance compared to v3.05. On my Quad Opteron
system, the round trip tests for 1000 years of Julian dates takes just 48 ms.
- Further performance optimizations for the core CGregorianCalendar algorithms.
There is a 3% increase in performance compared to v3.05. On my Quad Opteron
system, the round trip tests for 1000 years of Gregorian dates takes just 79
ms.
- Now includes comprehensive support for Holidays, Christian Saints Days,
National Holidays, US Specific Holidays, and Christian Feast Days via the new
class CJulianGregorianHolidays.
- Updated the month enum name and month strings for Moslem month "Ramadan".
- Now includes comprehensive support for Moslem Holidays via the new module
DTime+MoslemHolidays.h. Also you can determine Moslem holidays occurring in
a Gregorian year via MoslemOccurrencesInGregorianYear.
- Now includes comprehensive support for Hebrew Holidays via the new module
DTime+HebrewHolidays.h. Also you can determine Hebrew holidays occurring in
a Gregorian year via HewbrewOccurrencesInGregorianYear.
- Removed the now unnecessary defines DTIMEPLUS_EXT_CLASS and DTIMEPLUS_EXT_API.
These are no longer required because DTime+ is template based.
v3.05 (27 May 2006)
- Renamed the CHebrewCalendar::LongMarheshvan function to LongCheshvan.
- Renamed the CHebrewCalendar::ShortMarheshvan function to ShortCheshvan.
- Reworked Hebrew algorithms to support dates before the Hebrew epoch i.e.
a proleptic Hebrew calendar.
- Reworked Moslem algorithms to support dates before the Moslem epoch i.e.
a proleptic Moslem calendar.
- Updated the month enum names and month strings for the Moslem calendar.
- Updated the weekday strings for the Moslem calendar.
- Removed the need for the function DTimePlus::WeekOfDaysModulo.
v3.04 (25 May 2006)
- Updated the string and enums for the 7th month in the Hebrew calendar to
be "Tishrei". Thanks to Itamar Syn-Hershko for reporting this issue.
- Updated the string and enums for the first month in the Hebrew calendar
to be "Nissan". Thanks to Itamar Syn-Hershko for reporting this issue.
- Updated the string and enums for the 8th month in the Hebrew calendar to
be "Cheshvan". Thanks to Itamar Syn-Hershko for reporting this issue.
- Now includes spaces in the strings returned for AdarI and AdarII (the 12th
and 13th month of the Hebrew calendar).
- Fixed a typo in the string and enums for the 11th month in the Hebrew calendar "Shevat".
Thanks to Itamar Syn-Hershko for reporting this issue.
- Optimized the code in CJulianGregorianCalendar::DaysInMonth.
- Optimized the DTimePlus::WeekOfDayModulo and DTimePlus::lfloor functions.
This results in a 2 fold increase in the speed of the key algorithms for the
Julian and Gregorian calendars.
- made all the functions in CJulianGregorianCalendar inline.
- Optimized the CBaseMoslemCalendar::DaysInMonth code.
- Made some Moslem functions inline to aid optimization. These tweaks to the
Moslem algorithms result in a c. 40% speed improvement
- Made some Hebrew functions inline to aid optimization.
v3.03 (22 May 2006)
- Fixed a compile issue in VC 2003 with the multiplication operator for CLTimeSpan.
The issue was related to the tighter ISO conformance of the compiler. Thanks
to Itamar Syn-Hershko for reporting this issue.
v3.02 (20 May 2006)
- Canonical DaysInMonth method now takes a Year and a Month parameter instead
of a month and a leap year boolean. This is required for support of the Hebrew
calendar where knowing whether a year is a leap year or not is not good enough
to determine the number of days in any month. This is because of the more complex
nature of the Hebrew calendar and its' postponement rules for the Hebrew New
Year (Rosh ha-Shannah). Please note that this means you should examine all calls
to this method in client code to ensure it is updated correctly.
- Canonical DaysInYear method layout has been updated to take a year instead
of a leap year boolean. The reason is as for item one above. Again you should
examine all calls to this method in client code to ensure it is updated correctly.
- Canonical DaysSinceEndPreviousYear and DaysSinceFirstOfYear parameter layout
has been updated. Both now take a year, month and day value. The reason is as
for item one above. Again you should examine all calls to this method in client
code to ensure it is updated correctly.
- Moslem classes now uses functors for leap year functionality. This does
not affect client code in any way.
- CJulianCalendar now uses functors for leap year calculations. This does
not affect client code in any way.
- CGregorianCalendar now uses functors for leap year calculations. This does
not affect client code in any way.
- Now includes comprehensive support for the Hebrew calendar. The algorithms
are taken from the book "Calendrical Calculations, The Millenium Edition"
by Edward M. Reingold and Nachum Dershowitz. For example to create a date which
represents the date of Passover in 922 C.E., that is Nisan 15 A.M. 4682, you
would use:
DTimePlus::CDate<CHebrewCalendar> Passover(4682, Nisan,
15);
The Hebrew month's are defined as a standard enum in the DTimePlus
namespace just like you can use the Julian / Gregorian month names. Also various
helper functions are provided in the class CHebrewCalendar to handle the various
intricacies of this calendar.
- Addition of a AsHebrewCDate method to CDate class.
- Addition of a constructor and Set method to CLDate which allows construction
from a floating point days value.
- Updated the sample app, to verify the algorithms produce monotonically increasing
day counts for all Calendars (Gregorian, Julian, 4 flavours of the Moslem calendar
and Hebrew).
- Updated the sample app to widen the verification years for the algorithms
to cover the span -100,000 to 100,000 C.E.
- Updated the sample app to report the relative speeds of the various calendar
algorithms.
v3.01 (1 May 2006)
- Reworked the CDate and CLDate classes to use templates to specify the calendar
type to use (Julian, Gregorian or Moslem). By making these classes template
based, we have dispensed with a bool member variable in each instance, thereby
reducing the per instance memory size of each of these classes. It also means
that the serialized size for both of these classes has shrunk by 1 byte. By
also making the classes template based, the code should also have a better chance
of being optimized by the compiler. An example of the changes this implies to
client code is as follows:
CDate x(1990, CDate::March, 4, CDate::Gregorian)
-> DTimePlus::CDate<CGregorianCalendar>(1990, March, 4) and
CDate x(1990, CDate::March, 4, CDate::Julian) -> DTimePlus::CDate<CJulianCalendar>(1990,
March, 4)
- Because of the move to templates, I had a problem getting CLTimeSpan and
CLTimeOfDay to compile because there is a circular dependence between these
two classes. When you make a class template based, using forward class references
to resolve these issues now no longer works. Instead the CLTimeOfDay is now
also template based which works around the circular reference issue. An example
of the change this implies to client code is as follows:
CLTimeOfDay
y(10, 12, 14) -> DTimePlus::CLTimeOfDay<> y(10, 12, 14);
- Moved all the classes and methods out of the global namespace and into a
namespace called "DTimePlus"
- Implemented extensive support for the Moslem Calendar. The algorithms are
taken from the book "Calendrical Calculations, The Millenium Edition"
by Edward M. Reingold and Nachum Dershowitz. The 4 most common forms of the
Moslem Arithmetic calendar are supported namely the 15th and 16th year leap
year rules as well as the Civil Epoch (16 July 622 C.E. O.S) and the Astronomical
Epoch (15 July 622 C.E. O.S). These are implemented by the template classes
CMoslemCalendarCivil16, CMoslemCalendarCivil15, CMoslemCalendarAstronomical16
and finally CMoslemCalendarAstronomical15. For example to create a date which
represents Muharram 1, A.H. 1 using the Civil epoch and the 16th year leap rule
you would use:
DTimePlus::CDate<CMoslemCalendarCivil16> FirstDayOfMoslemEpoch(1,
Muharram, 1);
The Moslem month's are defined as a standard enum in the
DTimePlus namespace just like you can use the Julian / Gregorian month names.
- Optimized the operation of the various Format methods.
v3.0 (22 April 2006)
- Following a long term of hibernation, DTime is now back. It is now freeware
as opposed to Shareware, has been extensively reworked and has been renamed
to DTime+.
- Updated copyright details.
- Classes are no longer derived from CObject as this was not really necessary.
- Reworked the layout of the directories to ship as a more standard collection
of standard C++ modules. Like other code provided by the author. the code now
does not ship pre-built as an extension dll, instead it is provided as a pure
source code library. You are of course free to include DTime+ in an extension
dll if you so desire.
- Removed the timeframe concept from CLDate instance data.
- Removed support for ET and DeltaT. If you would like support for this please
check out the author's AA+ class framework at
http://www.naughter.com/aa.html.
- Integrating the concept of a Windows locale (LCID) into all functions which
return strings. This allows the code to easily mix and match calendar strings
from multiple languages in the one program.
- Because the code now tightly integrates with the Win32 NLS API's, DTime+
now does not need to carry around any resources of its own.
- Removed all virtual functions from all DTime+ classes.
- Removed the need to use friend classes.
- Updated the references to where the basic algorithms used by DTime+ are
based on. See the comments in the CDate::Set() method.
- Provided updated UI support via the standard Windows date / time controls.
- Updated the code to ensure relatively clean compiles using Visual Studio
2003 and 2005 (Still warnings in 2005 with calling the so called unsafe "C"
runtime functions).
- Did a full spell check and update of the documentation.
11 April 2000
v2.22 (14 May 1999)
- Updated 4 files for DTime. This fixes a number of problems DTime was having
when compiled with Visual C++ 6, Just copy the three cpp files into your DTime
"SRC" and the one h file into your DTime "Include"
directory over the existing files of the same name. 4 files are included in
total (1 file which was modified in v2.21) meaning that you do not need to apply
the v2.21 patch as the v2.22 patch includes all of the changes since the v2.2
main release.
v2.21 (17 July 1998)
- Updated 2 files for DTime which fixes a problem with usage of DTime in a
multithreading application. Basically it boiled down to code in DTime which
was making changes to a global array "MonthLength" from two threads.
Now a local array is used, thus preventing the problem. Just copy the two files
into your DTime "SRC" directory over the existing files of the same
name.
v2.2
- Modification to serialize functions to save space on disk.
- Replaced use of AFX_EXT_API and AFX_EXT_CLASS to allow use of DTime in another
extension dll.
- Added support for using the DTime source code directly in your application
instead of through an Extension DLL.
- Added a DTIME_NO_OLE_SUPPORT macro which removes the dependency of DTime
on the MFC OLE dlls. Note that this can only be used if you include the DTime
source code directly in your application.
- Changed the load address of all variants of the DTime dll. This reduces
the occurrences of dll collisions at process load up time.
- Made DTime and its sample programs compatible with VC++ 5.0.
- Added support in DTime for Proleptic Julian and Gregorian Calendars.
- Added support for converting from a CLDate to a COleDateTime.
- Removed the ‘Apply Now’ buttons from the data entry dialogs.
- Major revamp of the install program to give it a more professional look.
- Major update to the help file. Includes changes suggested by customers such
as making its look and feel more consistent with VC++ books online and Windows
95 Help. Also fixed a number of mistakes which were in the 2.1 version of the
help file.
v2.1
- v2.0 translation to German.
- Addition of extra CDate and CLDate functions to interact with SYSTEMTIME
and FILETIME SDK structures.
- Addition of extra CDate, CLTimeOfDay and CLDate functions which return a
tm struct.
- Major modification to CLDate::SetTimeFrame function to correctly handle
time zones other than GMT correctly.
- Number of other minor tweaks and bug fixes following feedback from customers.
- Fixed a number of anomalies in the help file dating back to v1.1.
- Enhanced the data entry methods DTime supports. It now allows a Julian Day
to be entered. Also additional flags have been added to control how the data
entry operates.
- All the arithmetic operators have been enhanced to handle invalid state
of their operands, instead of just asserting when an invalid operand is found.
v2.0
- Tighter integration with Win32 NLSAPI.
- Provision of a real control panel applet.
- Enhanced data entry routines.
- Numerous bug fixes.
- Removal of OS detection routine to separate package.
- Removal of Pushpin class to separate package.
- Removal of DOS and Win16 code no longer used.
- DTime has dropped support for millisecond fields in the CLTimeOfDay, CLTimeSpan
and CLDate classes. You will need to check code that was used with DTime v1.x
to make sure the correct constructors are being called. This functionality was
removed following customer feedback about its usefulness. The extra fields required
to support milliseconds also introduced a number of subtle bugs that were discovered
during testing of v2.0.
v1.11
- v1.0 translation to German.
v1.1
- Port to Win16 and DOS.
- Implementation of a comprehensive OS detection routine.
- A number of classes and functions to make code portable across OS platforms.
- Addition of a number of member functions to return a C runtime tm struct
version.
- TermDTime added and InitDTimeDll now renamed to InitDTime.
- ‘printf’ like function made available under Win16.
- A CStringEx class which provides a Format method under Win16 and DOS and
a LoadString method under DOS.
v1.0
- Initial public Win32 release.