Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / i18nutil / calendar.hxx
blob86a5beacd96dd8cdd28b49354a44e86bb3b1ba4e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #pragma once
12 namespace i18nutil
14 /** This number shows month days without Jan and Feb.
15 * According to the article, it is calculated as (365-31-28)/10 = 30.6, but because
16 * of a floating point bug, it was used as 30.6001 as a workaround.
18 * "30.6001, 25 year old hack?"
19 * https://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv011.cgi?read=31650 */
20 constexpr double monthDaysWithoutJanFeb = (365 - 31 - 28) / 10.0;
23 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */