/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <comphelper/date.hxx>
#include <cassert>
namespace comphelper::date
{ // Once upon a time the number of days we internally handled in tools' class // Date was limited to MAX_DAYS 3636532. That changed with a full 16-bit year. // Assuming the first valid positive date in a proleptic Gregorian calendar is // 0001-01-01, this resulted in an end date of 9957-06-26. // Hence we documented that years up to and including 9956 are handled. /* XXX: it is unclear history why this value was chosen, the representable * 9999-12-31 would be 3652060 days from 0001-01-01. Even 9998-12-31 to * distinguish from a maximum possible date would be 3651695. * There is connectivity/source/commontools/dbconversion.cxx that still has the
* same value to calculate with css::util::Date */ /* XXX can that dbconversion cope with years > 9999 or negative years at all?
* Database fields may be limited to positive 4 digits. */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.