bump product version to 5.0.4.1
[LibreOffice.git] / include / unotools / datetime.hxx
blobc7de9badd3f817cd0299bc62a1818a2b70f9075f
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 namespace tools { class Time; }
32 class DateTime;
34 namespace utl
37 UNOTOOLS_DLLPUBLIC void typeConvert(const Date& _rDate, css::util::Date& _rOut);
38 UNOTOOLS_DLLPUBLIC void typeConvert(const css::util::Date& _rDate, Date& _rOut);
40 UNOTOOLS_DLLPUBLIC void typeConvert(const DateTime& _rDateTime, css::util::DateTime& _rOut);
41 UNOTOOLS_DLLPUBLIC void typeConvert(const css::util::DateTime& _rDateTime, DateTime& _rOut);
43 UNOTOOLS_DLLPUBLIC void extractDate(const css::util::DateTime& _rDateTime, css::util::Date& _rOut);
45 UNOTOOLS_DLLPUBLIC ::rtl::OUString toISO8601(const css::util::DateTime& _rDateTime);
46 UNOTOOLS_DLLPUBLIC bool ISO8601parseDateTime(const ::rtl::OUString &i_rIn, css::util::DateTime& o_rDateTime);
47 UNOTOOLS_DLLPUBLIC bool ISO8601parseDate(const ::rtl::OUString &i_rIn, css::util::Date& o_rDate);
48 UNOTOOLS_DLLPUBLIC bool ISO8601parseTime(const ::rtl::OUString &i_rIn, css::util::Time& o_Time);
50 } // namespace utl
52 #endif // INCLUDED_UNOTOOLS_DATETIME_HXX
54 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */