SteveBrett
Programmer
Hi All
I've inherited 3 com based systems that are quite expansive and core to our main product - all of these systems use the same date manipulation function and we spend a lot of time working out the periods between dates (always in months) and various other functions e.g adding months, converting to strings etc.
i have found some huge functions that take a DATE object and populate a tm struct. The function goes some way to validate but is long and laborious.
We could simply include ATLComTime.h and perform the functions we need by creating COLEDateTime objects and manipulating those.
I am puzzled, however, as to why the guys originally wrote these huge functions and essentially reinvented the wheel ? Speed may have been the goal but these were written by a consultancy that may have been keen to make the dev work last as long as possible. It really looks like someones school project and I suspect some of the code is lifted from MFC functions.
Does anyone know of any good reason to avoid ATLComTime.h ?
Speed isn't really a massive issue for us.
Many thanks
Steve
I've inherited 3 com based systems that are quite expansive and core to our main product - all of these systems use the same date manipulation function and we spend a lot of time working out the periods between dates (always in months) and various other functions e.g adding months, converting to strings etc.
i have found some huge functions that take a DATE object and populate a tm struct. The function goes some way to validate but is long and laborious.
We could simply include ATLComTime.h and perform the functions we need by creating COLEDateTime objects and manipulating those.
I am puzzled, however, as to why the guys originally wrote these huge functions and essentially reinvented the wheel ? Speed may have been the goal but these were written by a consultancy that may have been keen to make the dev work last as long as possible. It really looks like someones school project and I suspect some of the code is lifted from MFC functions.
Does anyone know of any good reason to avoid ATLComTime.h ?
Speed isn't really a massive issue for us.
Many thanks
Steve