Boost logo

Boost Users :

Subject: [Boost-users] Unexpected behavior when using as::ftime() of Boost Locale library
From: Mouse Beer (holger.mickler_at_[hidden])
Date: 2014-06-27 05:07:16


Hi all,

I see a mismatch when using %Y format specifier with as::ftime. It looks
like it outputs the year according to the week of the year.

I hope I didn't miss or misunderstand anything... please find my small test
program attached for reference.

It was compiled as follows:
g++ -g -Wall -I /opt/boost/1.55/include -L /opt/boost/1.55/lib
-lboost_locale -lboost_thread -lboost_system -licuuc -licui18n -licudata
-lpthread -lrt boost_dates_test.cpp

I am running on Debian Testing:
$ ldd a.out
    linux-vdso.so.1 (0x00007fffa39fe000)
    libboost_locale.so.1.55.0 =>
/opt/boost/1.55/lib/libboost_locale.so.1.55.0 (0x00007fba3335b000)
    libboost_thread.so.1.55.0 =>
/opt/boost/1.55/lib/libboost_thread.so.1.55.0 (0x00007fba33142000)
    libboost_system.so.1.55.0 =>
/opt/boost/1.55/lib/libboost_system.so.1.55.0 (0x00007fba32f3e000)
    libicuuc.so.52 => /usr/lib/x86_64-linux-gnu/libicuuc.so.52
(0x00007fba32ba2000)
    libicui18n.so.52 => /usr/lib/x86_64-linux-gnu/libicui18n.so.52
(0x00007fba3279a000)
    libicudata.so.52 => /usr/lib/x86_64-linux-gnu/libicudata.so.52
(0x00007fba30f2c000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007fba30d0f000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fba30b07000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007fba307fb000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fba304fa000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
(0x00007fba302e4000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fba2ff3a000)
    libboost_chrono.so.1.55.0 =>
/opt/boost/1.55/lib/libboost_chrono.so.1.55.0 (0x00007fba2fd34000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fba2fb2f000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fba33642000)

The program shows the output of
cout<<date_time
and
cout<<as:ftime("%Y-%m...")<<date_time

If a mismatch in the year is detected, a "!" is added at the end of the
line.

When running with en_US locale, the output is as follows:

[ 10:49:40 ] [0] $ export LC_ALL=en_US.utf8

[ 10:50:39 ] [0] $ locale
LANG=
LANGUAGE=
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8

[ 10:50:41 ] [0] $ ./a.out
Dec 27, 2000, 12:00:00 AM ++ 2000-12-27 00:00:00
Dec 28, 2000, 12:00:00 AM ++ 2000-12-28 00:00:00
Dec 29, 2000, 12:00:00 AM ++ 2000-12-29 00:00:00
Dec 30, 2000, 12:00:00 AM ++ 2000-12-30 00:00:00
Dec 31, 2000, 12:00:00 AM ++ 2001-12-31 00:00:00 !
Jan 1, 2001, 12:00:00 AM ++ 2001-01-01 00:00:00
Jan 2, 2001, 12:00:00 AM ++ 2001-01-02 00:00:00
Jan 3, 2001, 12:00:00 AM ++ 2001-01-03 00:00:00
Jan 4, 2001, 12:00:00 AM ++ 2001-01-04 00:00:00
Jan 5, 2001, 12:00:00 AM ++ 2001-01-05 00:00:00

Dec 27, 2001, 12:00:00 AM ++ 2001-12-27 00:00:00
Dec 28, 2001, 12:00:00 AM ++ 2001-12-28 00:00:00
Dec 29, 2001, 12:00:00 AM ++ 2001-12-29 00:00:00
Dec 30, 2001, 12:00:00 AM ++ 2002-12-30 00:00:00 !
Dec 31, 2001, 12:00:00 AM ++ 2002-12-31 00:00:00 !
Jan 1, 2002, 12:00:00 AM ++ 2002-01-01 00:00:00
Jan 2, 2002, 12:00:00 AM ++ 2002-01-02 00:00:00
Jan 3, 2002, 12:00:00 AM ++ 2002-01-03 00:00:00
Jan 4, 2002, 12:00:00 AM ++ 2002-01-04 00:00:00
Jan 5, 2002, 12:00:00 AM ++ 2002-01-05 00:00:00

Dec 27, 2002, 12:00:00 AM ++ 2002-12-27 00:00:00
Dec 28, 2002, 12:00:00 AM ++ 2002-12-28 00:00:00
Dec 29, 2002, 12:00:00 AM ++ 2003-12-29 00:00:00 !
Dec 30, 2002, 12:00:00 AM ++ 2003-12-30 00:00:00 !
Dec 31, 2002, 12:00:00 AM ++ 2003-12-31 00:00:00 !
Jan 1, 2003, 12:00:00 AM ++ 2003-01-01 00:00:00
Jan 2, 2003, 12:00:00 AM ++ 2003-01-02 00:00:00
Jan 3, 2003, 12:00:00 AM ++ 2003-01-03 00:00:00
Jan 4, 2003, 12:00:00 AM ++ 2003-01-04 00:00:00
Jan 5, 2003, 12:00:00 AM ++ 2003-01-05 00:00:00

Dec 27, 2003, 12:00:00 AM ++ 2003-12-27 00:00:00
Dec 28, 2003, 12:00:00 AM ++ 2004-12-28 00:00:00 !
Dec 29, 2003, 12:00:00 AM ++ 2004-12-29 00:00:00 !
Dec 30, 2003, 12:00:00 AM ++ 2004-12-30 00:00:00 !
Dec 31, 2003, 12:00:00 AM ++ 2004-12-31 00:00:00 !
Jan 1, 2004, 12:00:00 AM ++ 2004-01-01 00:00:00
Jan 2, 2004, 12:00:00 AM ++ 2004-01-02 00:00:00
Jan 3, 2004, 12:00:00 AM ++ 2004-01-03 00:00:00
Jan 4, 2004, 12:00:00 AM ++ 2004-01-04 00:00:00
Jan 5, 2004, 12:00:00 AM ++ 2004-01-05 00:00:00

Dec 27, 2004, 12:00:00 AM ++ 2005-12-27 00:00:00 !
Dec 28, 2004, 12:00:00 AM ++ 2005-12-28 00:00:00 !
Dec 29, 2004, 12:00:00 AM ++ 2005-12-29 00:00:00 !
Dec 30, 2004, 12:00:00 AM ++ 2005-12-30 00:00:00 !
Dec 31, 2004, 12:00:00 AM ++ 2005-12-31 00:00:00 !
Jan 1, 2005, 12:00:00 AM ++ 2005-01-01 00:00:00
Jan 2, 2005, 12:00:00 AM ++ 2005-01-02 00:00:00
Jan 3, 2005, 12:00:00 AM ++ 2005-01-03 00:00:00
Jan 4, 2005, 12:00:00 AM ++ 2005-01-04 00:00:00
Jan 5, 2005, 12:00:00 AM ++ 2005-01-05 00:00:00

Dec 27, 2005, 12:00:00 AM ++ 2005-12-27 00:00:00
Dec 28, 2005, 12:00:00 AM ++ 2005-12-28 00:00:00
Dec 29, 2005, 12:00:00 AM ++ 2005-12-29 00:00:00
Dec 30, 2005, 12:00:00 AM ++ 2005-12-30 00:00:00
Dec 31, 2005, 12:00:00 AM ++ 2005-12-31 00:00:00
Jan 1, 2006, 12:00:00 AM ++ 2006-01-01 00:00:00
Jan 2, 2006, 12:00:00 AM ++ 2006-01-02 00:00:00
Jan 3, 2006, 12:00:00 AM ++ 2006-01-03 00:00:00
Jan 4, 2006, 12:00:00 AM ++ 2006-01-04 00:00:00
Jan 5, 2006, 12:00:00 AM ++ 2006-01-05 00:00:00

Dec 27, 2006, 12:00:00 AM ++ 2006-12-27 00:00:00
Dec 28, 2006, 12:00:00 AM ++ 2006-12-28 00:00:00
Dec 29, 2006, 12:00:00 AM ++ 2006-12-29 00:00:00
Dec 30, 2006, 12:00:00 AM ++ 2006-12-30 00:00:00
Dec 31, 2006, 12:00:00 AM ++ 2007-12-31 00:00:00 !
Jan 1, 2007, 12:00:00 AM ++ 2007-01-01 00:00:00
Jan 2, 2007, 12:00:00 AM ++ 2007-01-02 00:00:00
Jan 3, 2007, 12:00:00 AM ++ 2007-01-03 00:00:00
Jan 4, 2007, 12:00:00 AM ++ 2007-01-04 00:00:00
Jan 5, 2007, 12:00:00 AM ++ 2007-01-05 00:00:00

Dec 27, 2007, 12:00:00 AM ++ 2007-12-27 00:00:00
Dec 28, 2007, 12:00:00 AM ++ 2007-12-28 00:00:00
Dec 29, 2007, 12:00:00 AM ++ 2007-12-29 00:00:00
Dec 30, 2007, 12:00:00 AM ++ 2008-12-30 00:00:00 !
Dec 31, 2007, 12:00:00 AM ++ 2008-12-31 00:00:00 !
Jan 1, 2008, 12:00:00 AM ++ 2008-01-01 00:00:00
Jan 2, 2008, 12:00:00 AM ++ 2008-01-02 00:00:00
Jan 3, 2008, 12:00:00 AM ++ 2008-01-03 00:00:00
Jan 4, 2008, 12:00:00 AM ++ 2008-01-04 00:00:00
Jan 5, 2008, 12:00:00 AM ++ 2008-01-05 00:00:00

Dec 27, 2008, 12:00:00 AM ++ 2008-12-27 00:00:00
Dec 28, 2008, 12:00:00 AM ++ 2009-12-28 00:00:00 !
Dec 29, 2008, 12:00:00 AM ++ 2009-12-29 00:00:00 !
Dec 30, 2008, 12:00:00 AM ++ 2009-12-30 00:00:00 !
Dec 31, 2008, 12:00:00 AM ++ 2009-12-31 00:00:00 !
Jan 1, 2009, 12:00:00 AM ++ 2009-01-01 00:00:00
Jan 2, 2009, 12:00:00 AM ++ 2009-01-02 00:00:00
Jan 3, 2009, 12:00:00 AM ++ 2009-01-03 00:00:00
Jan 4, 2009, 12:00:00 AM ++ 2009-01-04 00:00:00
Jan 5, 2009, 12:00:00 AM ++ 2009-01-05 00:00:00

Dec 27, 2009, 12:00:00 AM ++ 2010-12-27 00:00:00 !
Dec 28, 2009, 12:00:00 AM ++ 2010-12-28 00:00:00 !
Dec 29, 2009, 12:00:00 AM ++ 2010-12-29 00:00:00 !
Dec 30, 2009, 12:00:00 AM ++ 2010-12-30 00:00:00 !
Dec 31, 2009, 12:00:00 AM ++ 2010-12-31 00:00:00 !
Jan 1, 2010, 12:00:00 AM ++ 2010-01-01 00:00:00
Jan 2, 2010, 12:00:00 AM ++ 2010-01-02 00:00:00
Jan 3, 2010, 12:00:00 AM ++ 2010-01-03 00:00:00
Jan 4, 2010, 12:00:00 AM ++ 2010-01-04 00:00:00
Jan 5, 2010, 12:00:00 AM ++ 2010-01-05 00:00:00

Dec 27, 2010, 12:00:00 AM ++ 2011-12-27 00:00:00 !
Dec 28, 2010, 12:00:00 AM ++ 2011-12-28 00:00:00 !
Dec 29, 2010, 12:00:00 AM ++ 2011-12-29 00:00:00 !
Dec 30, 2010, 12:00:00 AM ++ 2011-12-30 00:00:00 !
Dec 31, 2010, 12:00:00 AM ++ 2011-12-31 00:00:00 !
Jan 1, 2011, 12:00:00 AM ++ 2011-01-01 00:00:00
Jan 2, 2011, 12:00:00 AM ++ 2011-01-02 00:00:00
Jan 3, 2011, 12:00:00 AM ++ 2011-01-03 00:00:00
Jan 4, 2011, 12:00:00 AM ++ 2011-01-04 00:00:00
Jan 5, 2011, 12:00:00 AM ++ 2011-01-05 00:00:00

Dec 27, 2011, 12:00:00 AM ++ 2011-12-27 00:00:00
Dec 28, 2011, 12:00:00 AM ++ 2011-12-28 00:00:00
Dec 29, 2011, 12:00:00 AM ++ 2011-12-29 00:00:00
Dec 30, 2011, 12:00:00 AM ++ 2011-12-30 00:00:00
Dec 31, 2011, 12:00:00 AM ++ 2011-12-31 00:00:00
Jan 1, 2012, 12:00:00 AM ++ 2012-01-01 00:00:00
Jan 2, 2012, 12:00:00 AM ++ 2012-01-02 00:00:00
Jan 3, 2012, 12:00:00 AM ++ 2012-01-03 00:00:00
Jan 4, 2012, 12:00:00 AM ++ 2012-01-04 00:00:00
Jan 5, 2012, 12:00:00 AM ++ 2012-01-05 00:00:00

Dec 27, 2012, 12:00:00 AM ++ 2012-12-27 00:00:00
Dec 28, 2012, 12:00:00 AM ++ 2012-12-28 00:00:00
Dec 29, 2012, 12:00:00 AM ++ 2012-12-29 00:00:00
Dec 30, 2012, 12:00:00 AM ++ 2013-12-30 00:00:00 !
Dec 31, 2012, 12:00:00 AM ++ 2013-12-31 00:00:00 !
Jan 1, 2013, 12:00:00 AM ++ 2013-01-01 00:00:00
Jan 2, 2013, 12:00:00 AM ++ 2013-01-02 00:00:00
Jan 3, 2013, 12:00:00 AM ++ 2013-01-03 00:00:00
Jan 4, 2013, 12:00:00 AM ++ 2013-01-04 00:00:00
Jan 5, 2013, 12:00:00 AM ++ 2013-01-05 00:00:00

Dec 27, 2013, 12:00:00 AM ++ 2013-12-27 00:00:00
Dec 28, 2013, 12:00:00 AM ++ 2013-12-28 00:00:00
Dec 29, 2013, 12:00:00 AM ++ 2014-12-29 00:00:00 !
Dec 30, 2013, 12:00:00 AM ++ 2014-12-30 00:00:00 !
Dec 31, 2013, 12:00:00 AM ++ 2014-12-31 00:00:00 !
Jan 1, 2014, 12:00:00 AM ++ 2014-01-01 00:00:00
Jan 2, 2014, 12:00:00 AM ++ 2014-01-02 00:00:00
Jan 3, 2014, 12:00:00 AM ++ 2014-01-03 00:00:00
Jan 4, 2014, 12:00:00 AM ++ 2014-01-04 00:00:00
Jan 5, 2014, 12:00:00 AM ++ 2014-01-05 00:00:00

When running with de_DE locale, the output is as follows:

[ 10:51:42 ] [0] $ export LC_ALL=de_DE.utf8

[ 10:55:04 ] [0] $ locale
LANG=
LANGUAGE=
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=de_DE.utf8

[ 10:55:05 ] [0] $ ./a.out
27.12.2000 00:00:00 ++ 2000-12-27 00:00:00
28.12.2000 00:00:00 ++ 2000-12-28 00:00:00
29.12.2000 00:00:00 ++ 2000-12-29 00:00:00
30.12.2000 00:00:00 ++ 2000-12-30 00:00:00
31.12.2000 00:00:00 ++ 2000-12-31 00:00:00
01.01.2001 00:00:00 ++ 2001-01-01 00:00:00
02.01.2001 00:00:00 ++ 2001-01-02 00:00:00
03.01.2001 00:00:00 ++ 2001-01-03 00:00:00
04.01.2001 00:00:00 ++ 2001-01-04 00:00:00
05.01.2001 00:00:00 ++ 2001-01-05 00:00:00

27.12.2001 00:00:00 ++ 2001-12-27 00:00:00
28.12.2001 00:00:00 ++ 2001-12-28 00:00:00
29.12.2001 00:00:00 ++ 2001-12-29 00:00:00
30.12.2001 00:00:00 ++ 2001-12-30 00:00:00
31.12.2001 00:00:00 ++ 2002-12-31 00:00:00 !
01.01.2002 00:00:00 ++ 2002-01-01 00:00:00
02.01.2002 00:00:00 ++ 2002-01-02 00:00:00
03.01.2002 00:00:00 ++ 2002-01-03 00:00:00
04.01.2002 00:00:00 ++ 2002-01-04 00:00:00
05.01.2002 00:00:00 ++ 2002-01-05 00:00:00

27.12.2002 00:00:00 ++ 2002-12-27 00:00:00
28.12.2002 00:00:00 ++ 2002-12-28 00:00:00
29.12.2002 00:00:00 ++ 2002-12-29 00:00:00
30.12.2002 00:00:00 ++ 2003-12-30 00:00:00 !
31.12.2002 00:00:00 ++ 2003-12-31 00:00:00 !
01.01.2003 00:00:00 ++ 2003-01-01 00:00:00
02.01.2003 00:00:00 ++ 2003-01-02 00:00:00
03.01.2003 00:00:00 ++ 2003-01-03 00:00:00
04.01.2003 00:00:00 ++ 2003-01-04 00:00:00
05.01.2003 00:00:00 ++ 2003-01-05 00:00:00

27.12.2003 00:00:00 ++ 2003-12-27 00:00:00
28.12.2003 00:00:00 ++ 2003-12-28 00:00:00
29.12.2003 00:00:00 ++ 2004-12-29 00:00:00 !
30.12.2003 00:00:00 ++ 2004-12-30 00:00:00 !
31.12.2003 00:00:00 ++ 2004-12-31 00:00:00 !
01.01.2004 00:00:00 ++ 2004-01-01 00:00:00
02.01.2004 00:00:00 ++ 2004-01-02 00:00:00
03.01.2004 00:00:00 ++ 2004-01-03 00:00:00
04.01.2004 00:00:00 ++ 2004-01-04 00:00:00
05.01.2004 00:00:00 ++ 2004-01-05 00:00:00

27.12.2004 00:00:00 ++ 2004-12-27 00:00:00
28.12.2004 00:00:00 ++ 2004-12-28 00:00:00
29.12.2004 00:00:00 ++ 2004-12-29 00:00:00
30.12.2004 00:00:00 ++ 2004-12-30 00:00:00
31.12.2004 00:00:00 ++ 2004-12-31 00:00:00
01.01.2005 00:00:00 ++ 2004-01-01 00:00:00 !
02.01.2005 00:00:00 ++ 2004-01-02 00:00:00 !
03.01.2005 00:00:00 ++ 2005-01-03 00:00:00
04.01.2005 00:00:00 ++ 2005-01-04 00:00:00
05.01.2005 00:00:00 ++ 2005-01-05 00:00:00

27.12.2005 00:00:00 ++ 2005-12-27 00:00:00
28.12.2005 00:00:00 ++ 2005-12-28 00:00:00
29.12.2005 00:00:00 ++ 2005-12-29 00:00:00
30.12.2005 00:00:00 ++ 2005-12-30 00:00:00
31.12.2005 00:00:00 ++ 2005-12-31 00:00:00
01.01.2006 00:00:00 ++ 2005-01-01 00:00:00 !
02.01.2006 00:00:00 ++ 2006-01-02 00:00:00
03.01.2006 00:00:00 ++ 2006-01-03 00:00:00
04.01.2006 00:00:00 ++ 2006-01-04 00:00:00
05.01.2006 00:00:00 ++ 2006-01-05 00:00:00

27.12.2006 00:00:00 ++ 2006-12-27 00:00:00
28.12.2006 00:00:00 ++ 2006-12-28 00:00:00
29.12.2006 00:00:00 ++ 2006-12-29 00:00:00
30.12.2006 00:00:00 ++ 2006-12-30 00:00:00
31.12.2006 00:00:00 ++ 2006-12-31 00:00:00
01.01.2007 00:00:00 ++ 2007-01-01 00:00:00
02.01.2007 00:00:00 ++ 2007-01-02 00:00:00
03.01.2007 00:00:00 ++ 2007-01-03 00:00:00
04.01.2007 00:00:00 ++ 2007-01-04 00:00:00
05.01.2007 00:00:00 ++ 2007-01-05 00:00:00

27.12.2007 00:00:00 ++ 2007-12-27 00:00:00
28.12.2007 00:00:00 ++ 2007-12-28 00:00:00
29.12.2007 00:00:00 ++ 2007-12-29 00:00:00
30.12.2007 00:00:00 ++ 2007-12-30 00:00:00
31.12.2007 00:00:00 ++ 2008-12-31 00:00:00 !
01.01.2008 00:00:00 ++ 2008-01-01 00:00:00
02.01.2008 00:00:00 ++ 2008-01-02 00:00:00
03.01.2008 00:00:00 ++ 2008-01-03 00:00:00
04.01.2008 00:00:00 ++ 2008-01-04 00:00:00
05.01.2008 00:00:00 ++ 2008-01-05 00:00:00

27.12.2008 00:00:00 ++ 2008-12-27 00:00:00
28.12.2008 00:00:00 ++ 2008-12-28 00:00:00
29.12.2008 00:00:00 ++ 2009-12-29 00:00:00 !
30.12.2008 00:00:00 ++ 2009-12-30 00:00:00 !
31.12.2008 00:00:00 ++ 2009-12-31 00:00:00 !
01.01.2009 00:00:00 ++ 2009-01-01 00:00:00
02.01.2009 00:00:00 ++ 2009-01-02 00:00:00
03.01.2009 00:00:00 ++ 2009-01-03 00:00:00
04.01.2009 00:00:00 ++ 2009-01-04 00:00:00
05.01.2009 00:00:00 ++ 2009-01-05 00:00:00

27.12.2009 00:00:00 ++ 2009-12-27 00:00:00
28.12.2009 00:00:00 ++ 2009-12-28 00:00:00
29.12.2009 00:00:00 ++ 2009-12-29 00:00:00
30.12.2009 00:00:00 ++ 2009-12-30 00:00:00
31.12.2009 00:00:00 ++ 2009-12-31 00:00:00
01.01.2010 00:00:00 ++ 2009-01-01 00:00:00 !
02.01.2010 00:00:00 ++ 2009-01-02 00:00:00 !
03.01.2010 00:00:00 ++ 2009-01-03 00:00:00 !
04.01.2010 00:00:00 ++ 2010-01-04 00:00:00
05.01.2010 00:00:00 ++ 2010-01-05 00:00:00

27.12.2010 00:00:00 ++ 2010-12-27 00:00:00
28.12.2010 00:00:00 ++ 2010-12-28 00:00:00
29.12.2010 00:00:00 ++ 2010-12-29 00:00:00
30.12.2010 00:00:00 ++ 2010-12-30 00:00:00
31.12.2010 00:00:00 ++ 2010-12-31 00:00:00
01.01.2011 00:00:00 ++ 2010-01-01 00:00:00 !
02.01.2011 00:00:00 ++ 2010-01-02 00:00:00 !
03.01.2011 00:00:00 ++ 2011-01-03 00:00:00
04.01.2011 00:00:00 ++ 2011-01-04 00:00:00
05.01.2011 00:00:00 ++ 2011-01-05 00:00:00

27.12.2011 00:00:00 ++ 2011-12-27 00:00:00
28.12.2011 00:00:00 ++ 2011-12-28 00:00:00
29.12.2011 00:00:00 ++ 2011-12-29 00:00:00
30.12.2011 00:00:00 ++ 2011-12-30 00:00:00
31.12.2011 00:00:00 ++ 2011-12-31 00:00:00
01.01.2012 00:00:00 ++ 2011-01-01 00:00:00 !
02.01.2012 00:00:00 ++ 2012-01-02 00:00:00
03.01.2012 00:00:00 ++ 2012-01-03 00:00:00
04.01.2012 00:00:00 ++ 2012-01-04 00:00:00
05.01.2012 00:00:00 ++ 2012-01-05 00:00:00

27.12.2012 00:00:00 ++ 2012-12-27 00:00:00
28.12.2012 00:00:00 ++ 2012-12-28 00:00:00
29.12.2012 00:00:00 ++ 2012-12-29 00:00:00
30.12.2012 00:00:00 ++ 2012-12-30 00:00:00
31.12.2012 00:00:00 ++ 2013-12-31 00:00:00 !
01.01.2013 00:00:00 ++ 2013-01-01 00:00:00
02.01.2013 00:00:00 ++ 2013-01-02 00:00:00
03.01.2013 00:00:00 ++ 2013-01-03 00:00:00
04.01.2013 00:00:00 ++ 2013-01-04 00:00:00
05.01.2013 00:00:00 ++ 2013-01-05 00:00:00

27.12.2013 00:00:00 ++ 2013-12-27 00:00:00
28.12.2013 00:00:00 ++ 2013-12-28 00:00:00
29.12.2013 00:00:00 ++ 2013-12-29 00:00:00
30.12.2013 00:00:00 ++ 2014-12-30 00:00:00 !
31.12.2013 00:00:00 ++ 2014-12-31 00:00:00 !
01.01.2014 00:00:00 ++ 2014-01-01 00:00:00
02.01.2014 00:00:00 ++ 2014-01-02 00:00:00
03.01.2014 00:00:00 ++ 2014-01-03 00:00:00
04.01.2014 00:00:00 ++ 2014-01-04 00:00:00
05.01.2014 00:00:00 ++ 2014-01-05 00:00:00

Sorry for the long post!

Did I make any mistake in my program or is this a bug of as::ftime("%Y")
formatting?

Thank you yery much for your help!

Regards,
  Holger





Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net