summaryrefslogtreecommitdiff
path: root/include/tools/date.hxx
AgeCommit message (Collapse)Author
2020-05-03use more compact namespace syntax in /includeNoel Grandin
excluding the UDK headers of course Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-08Grammar fixesAndrea Gelmini
Change-Id: I6ac6f6abb601aa254e94612e6826488393de8e3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86383 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-10-17tdf#42949 Fix IWYU warnings in include/tools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9dc920e9388f9e2aa4dcae1f0b3f7562d08f7f70 Reviewed-on: https://gerrit.libreoffice.org/61809 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-07tools: date unit testsChris Sherlock
Change-Id: I2b3eaf74173f7f456f04c734dfb7c05c95802809 Reviewed-on: https://gerrit.libreoffice.org/53895 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-20loplugin:unused-returns in filter,tools,xmloffNoel Grandin
Change-Id: I7a57be7e241883adac4417baa699a97d6304a631 Reviewed-on: https://gerrit.libreoffice.org/48188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21Eliminate Date::operator+=() and -=() and replace with Date::AddDays()Eike Rathke
Clarifies code and gets rid of explicitly casting the operand to sal_Int32. Also in preparation of removing DateTime::operator+=(sal_Int32) that is confusingly similar to DateTime::operator+=(double) and just depends on type. Change-Id: I83422e2940fbb017978db9b5734b4966228af3de Reviewed-on: https://gerrit.libreoffice.org/40248 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-07-03use sal_Int32 in tools::DateNoel Grandin
instead of long, which has platform-dependant length (32bits on windows, 64bit on everything else) Change-Id: I9b5a950f56dad99a016b481c221bfd103ffa3911 Reviewed-on: https://gerrit.libreoffice.org/39433 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-05Introduce Date::IsEmpty()Eike Rathke
Change-Id: I4199b1da723c93b369c84bf664ef2d6e6e6dabb7
2017-05-05Comment that day and month must be <100 and year != 0Eike Rathke
Change-Id: Ibfb003f4ce108b401e3102fecd0843dc75fcb41e
2017-04-28Adapt documentation to realityEike Rathke
Change-Id: Ic76cdff3c95e68e91700ca7143e8aa8c908ed56e
2016-07-08Resolves: tdf#100452 class Date full (BCE,CE) proleptic Gregorian calendarEike Rathke
... implementing signed years with year 0 gap. Date(31,12,-1) last day BCE Date(1,1,1) first day CE New class Date member functions: * AddYears(sal_Int16) to be used instead of aDate.SetYear(aDate.GetYear()+sal_Int16) to handle year 0 gap. * convenience GetNextYear() to be used insted of GetYear()+1 * convenience GetPrevYear() to be used insted of GetYear()-1 * AddMonths(sal_Int32) * operator=(const css::util::Date&) New class DateTime member functions: * operator=(const css::util::DateTime&) Made some conversion ctors explicit, specifically Date(sal_Int32) Adapted hopefully all places that used a sal_uInt16 year to use sal_Int16 where appropriate. Eliminated some quirks in date handling found on the fly. Added era handling to i18npool icu calendar setting interface, which missing was responsible for 0001-01-01 entered in Calc being set as -0001-01-01, hence subtracting one day resulted in -0002-12-31. Change-Id: I77b39fba9599ebd5067d7864f6c9ebe01f6f578f Reviewed-on: https://gerrit.libreoffice.org/27049 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-02-08loplugin:unusedmethodsNoel Grandin
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-10Fix order of SAL_WARN_UNUSED and DLLPUBLIC for clang-clStephan Bergmann
...which, somewhat arbitrarily, expects GNU extension __attribute__((...)) to come before MSVC extension __declspec(...) with MaybeParseGNUAttributes(attrs); MaybeParseMicrosoftDeclSpecs(attrs); in Parser::ParseClassSpecifier (lib/Parse/ParseDeclCXX.cpp). Change-Id: I5936558c8fc08b278575b6c678cde6eccd4647fb
2015-10-28Rename (private) Date::init and reuse itMatteo Casalin
Change-Id: I3123876860cf6cce1e16c8f516f3d08fa7e15d83
2015-10-23com::sun::star->css in include/sot to include/typelibNoel Grandin
Change-Id: I9cd92b53370a6b6018d2f7c648890f9c014a27de
2015-01-13simplify Date/Time/DateTime conversion codeNoel Grandin
add constructors to Date/DateTime/Time, that take the css::util counterparts, to simplify code converting between these type Change-Id: I4b03da02c63f65b6ec18cb4d6ecc3859bdef1ff7 Reviewed-on: https://gerrit.libreoffice.org/13855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2014-12-31Date/Time no longer loaded from rsc filesCaolán McNamara
Change-Id: Ia9ed86b0d96cac76c2e1639065a4ac594c2966b1
2014-07-08fdo#66507 - accelerate common datum date conversion to days.Michael Meeks
Saves ~40bn cycles, 10% of calculation for the bug document. Change-Id: I9d48706ad2cfe290965b648306d95b4d66e5fc63
2014-02-20fdo#63154 Remove unused solar.h reference in toolsAlexandre Vicenzi
Change-Id: Ic450a82a201cb4da3b0c2992908b597220038871 Reviewed-on: https://gerrit.libreoffice.org/8135 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2013-11-09fdo#65108 inter-module includes <> include/toolsNorbert Thiebaud
Change-Id: I5f44f041e465230d10d562e8bd6f141848465e07
2013-10-23fixincludeguards.sh: include/{toolkit,tools}Thomas Arnhold
Change-Id: I5572c320431222be2405f8c2dc8adeafe4f3828b
2013-08-04fdo#67235 adapt form control code to time nanosecond API change, step 3Lionel Elie Mamane
Change-Id: I4899c89ee5b2a54c9c05b531ab284365f1558e3d Reviewed-on: https://gerrit.libreoffice.org/5270 Tested-by: Lionel Elie Mamane <lionel@mamane.lu> Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2013-07-05TODO note for future *internal* API changeLionel Elie Mamane
Signed year so that ~all our date types have about the same capacities. Change-Id: Iab8a66bee0eb22ffd04608c345302218094e53a7
2013-06-30Clean String and sal_Bool in toolsNorbert Thiebaud
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655 Reviewed-on: https://gerrit.libreoffice.org/4627 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-05-17added documentation about non-normalized invalid datesEike Rathke
Change-Id: I88a95d8fac8af9085d41cf1b13c8ff3ee7abb141
2013-05-17resolved fdo#63805 max day of month of the intended monthEike Rathke
Since 6619955e72c1c2f29a32e82478d19147c0d7610a Date::GetDaysInMonth() operates on the normalized value that corresponds to the actual values set at the Date instance, obtain and set number of days for the intended month instead of using the rolled-over date. Change-Id: Ia6b007675104f8e134b278f216c3bb48b72f061c
2013-04-23execute move of global headersBjoern Michaelsen
see https://gerrit.libreoffice.org/#/c/3367/ and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a