"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libgnucash/engine/gnc-date.cpp" between
gnucash-3.6.tar.bz2 and gnucash-3.7.tar.bz2

About: GnuCash is personal and small-business financial-accounting software.

gnc-date.cpp  (gnucash-3.6.tar.bz2):gnc-date.cpp  (gnucash-3.7.tar.bz2)
skipping to change at line 51 skipping to change at line 51
#endif #endif
#ifndef HAVE_STRPTIME #ifndef HAVE_STRPTIME
#include <strptime.h> #include <strptime.h>
#endif #endif
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
# include <windows.h> # include <windows.h>
#endif #endif
} }
#include <cinttypes> #include <cinttypes>
#include <unicode/calendar.h>
#include "gnc-date.h" #include "gnc-date.h"
#include "gnc-date-p.h" #include "gnc-date-p.h"
#include "gnc-datetime.hpp" #include "gnc-datetime.hpp"
#include "gnc-timezone.hpp" #include "gnc-timezone.hpp"
#define BOOST_ERROR_CODE_HEADER_ONLY #define BOOST_ERROR_CODE_HEADER_ONLY
#include <boost/date_time/local_time/local_time.hpp> #include <boost/date_time/local_time/local_time.hpp>
#define N_(string) string //So that xgettext will find it #define N_(string) string //So that xgettext will find it
skipping to change at line 204 skipping to change at line 205
*time = gncdt.utc_tm(); *time = gncdt.utc_tm();
return time; return time;
} }
catch(std::invalid_argument&) catch(std::invalid_argument&)
{ {
return NULL; return NULL;
} }
} }
gint
gnc_start_of_week (void)
{
/* icu's day of week is 1 based. Using 0 here to mean unset or error while s
etting */
static int cached_result = 0;
if (!cached_result)
{
UErrorCode err = U_ZERO_ERROR;
auto cal = icu::Calendar::createInstance (err);
if (!cal)
{
PERR("ICU error: %s\n", u_errorName (err));
return 0;
}
/* 1 for sunday, 2 for monday, etc. */
cached_result = cal->getFirstDayOfWeek (err);
delete cal;
}
return cached_result;
}
time64 time64
gnc_mktime (struct tm* time) gnc_mktime (struct tm* time)
{ {
try try
{ {
normalize_struct_tm (time); normalize_struct_tm (time);
GncDateTime gncdt(*time); GncDateTime gncdt(*time);
*time = static_cast<struct tm>(gncdt); *time = static_cast<struct tm>(gncdt);
return static_cast<time64>(gncdt); return static_cast<time64>(gncdt);
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)