nss: upgrade to release 3.73
[LibreOffice.git] / basic / source / inc / date.hxx
blob4b6cb115fbbf553268e7cf95a564ecd2d8125630
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <com/sun/star/util/Date.hpp>
23 #include <com/sun/star/util/Time.hpp>
24 #include <com/sun/star/util/DateTime.hpp>
26 #include <basic/sbxvar.hxx>
28 enum class SbDateCorrection
30 None,
31 RollOver,
32 TruncateToMonth
35 bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bUseTwoDigitYear, SbDateCorrection eCorr, double& rdRet );
36 double implTimeSerial( sal_Int16 nHour, sal_Int16 nMinute, sal_Int16 nSecond);
37 bool implDateTimeSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
38 sal_Int16 nHour, sal_Int16 nMinute, sal_Int16 nSecond,
39 double& rdRet );
41 sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 );
43 sal_Int16 implGetDateYear( double aDate );
44 sal_Int16 implGetDateMonth( double aDate );
45 sal_Int16 implGetDateDay( double aDate );
47 sal_Int16 implGetHour( double dDate );
48 sal_Int16 implGetMinute( double dDate );
49 sal_Int16 implGetSecond( double dDate );
51 css::util::Date SbxDateToUNODate( const SbxValue* );
52 void SbxDateFromUNODate( SbxValue*, const css::util::Date& );
53 css::util::Time SbxDateToUNOTime( const SbxValue* );
54 void SbxDateFromUNOTime( SbxValue*, const css::util::Time& );
55 css::util::DateTime SbxDateToUNODateTime( const SbxValue* );
56 void SbxDateFromUNODateTime( SbxValue*, const css::util::DateTime& );
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */