cid#1636693 COPY_INSTEAD_OF_MOVE
[LibreOffice.git] / basic / source / inc / date.hxx
blob5db9df621b9e0202403865b3df475f0f3aa8902d
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 sal_Int32 nMilliSecond);
38 bool implDateTimeSerial(sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, sal_Int16 nHour,
39 sal_Int16 nMinute, sal_Int16 nSecond, sal_Int32 nMilliSecond,
40 double& rdRet);
42 sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 );
44 sal_Int16 implGetDateYear( double aDate );
45 sal_Int16 implGetDateMonth( double aDate );
46 sal_Int16 implGetDateDay( double aDate );
48 sal_Int16 implGetHour( double dDate );
49 sal_Int16 implGetMinute( double dDate );
50 sal_Int16 implGetSecond( double dDate );
51 sal_Int32 implGetNanoSecond(double dDate);
53 css::util::Date SbxDateToUNODate( const SbxValue* );
54 void SbxDateFromUNODate( SbxValue*, const css::util::Date& );
55 css::util::Time SbxDateToUNOTime( const SbxValue* );
56 void SbxDateFromUNOTime( SbxValue*, const css::util::Time& );
57 css::util::DateTime SbxDateToUNODateTime( const SbxValue* );
58 void SbxDateFromUNODateTime( SbxValue*, const css::util::DateTime& );
60 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */