Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hi,

https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=6d4f2dcc7cbba771e9d9b00de50368db4a88ef1b

implements signed years with tools' class Date providing a full BCE,CE
proleptic Gregorian calendar.

Hopefully you shouldn't notice anything bad and I caught all relevant
places with that change. However, please be aware that

* year is now a signed sal_Int16 instead of unsigned sal_uInt16, the
  full int16 range can be used
* year 0 does not exist and the gap is skipped in calculations, last day
  BCE is -0001-12-31, first day CE is 0001-01-01
* do not use aDate.SetYear(aDate.GetYear()+number), use
  aDate.AddYears(number) instead
* years 1,5,9,... BCE (-1,-5,-9,...) are leap years

Further details in the commit message and include/tools/date.hxx

Happy dating :P

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

Attachment: signature.asc
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.