bump product version to 4.2.0.1
[LibreOffice.git] / include / unotools / datetime.hxx
blobc1e494d2c503334fa86259569162af96d578e55d
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 //= conversions UNO3.TimeClass <-> Tools.TimeClass (Date/Time/DateTime)
21 #include <unotools/unotoolsdllapi.h>
23 #ifndef INCLUDED_UNOTOOLS_DATETIME_HXX
24 #define INCLUDED_UNOTOOLS_DATETIME_HXX
26 #include <com/sun/star/util/Date.hpp>
27 #include <com/sun/star/util/Time.hpp>
28 #include <com/sun/star/util/DateTime.hpp>
30 class Date;
31 class Time;
32 class DateTime;
34 //.........................................................................
35 namespace utl
37 //.........................................................................
39 namespace starutil = ::com::sun::star::util;
41 UNOTOOLS_DLLPUBLIC void typeConvert(const Date& _rDate, starutil::Date& _rOut);
42 UNOTOOLS_DLLPUBLIC void typeConvert(const starutil::Date& _rDate, Date& _rOut);
44 UNOTOOLS_DLLPUBLIC void typeConvert(const DateTime& _rDateTime, starutil::DateTime& _rOut);
45 UNOTOOLS_DLLPUBLIC void typeConvert(const starutil::DateTime& _rDateTime, DateTime& _rOut);
47 UNOTOOLS_DLLPUBLIC ::rtl::OUString toISO8601(const starutil::DateTime& _rDateTime);
48 UNOTOOLS_DLLPUBLIC ::rtl::OUString toISO8601(const starutil::Time& _rTime);
49 UNOTOOLS_DLLPUBLIC bool ISO8601parseDateTime(const ::rtl::OUString &i_rIn, starutil::DateTime& o_rDateTime);
50 UNOTOOLS_DLLPUBLIC bool ISO8601parseDate(const ::rtl::OUString &i_rIn, starutil::Date& o_rDate);
51 UNOTOOLS_DLLPUBLIC bool ISO8601parseTime(const ::rtl::OUString &i_rIn, starutil::Time& o_Time);
53 //.........................................................................
54 } // namespace utl
55 //.........................................................................
57 #endif // INCLUDED_UNOTOOLS_DATETIME_HXX
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */