1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
21 #ifndef INCLUDED_UNOTOOLS_DATETIME_HXX
22 #define INCLUDED_UNOTOOLS_DATETIME_HXX
24 //= conversions UNO3.TimeClass <-> Tools.TimeClass (Date/Time/DateTime)
25 #include <unotools/unotoolsdllapi.h>
26 #include <rtl/ustring.hxx>
28 namespace com
{ namespace sun
{ namespace star
{ namespace util
{ struct Date
; } } } }
29 namespace com
{ namespace sun
{ namespace star
{ namespace util
{ struct DateTime
; } } } }
30 namespace com
{ namespace sun
{ namespace star
{ namespace util
{ struct Time
; } } } }
34 class LocaleDataWrapper
;
38 UNOTOOLS_DLLPUBLIC
const LocaleDataWrapper
& GetLocaleData();
39 UNOTOOLS_DLLPUBLIC DateTime
GetDateTime(const css::util::DateTime
& _rDT
);
40 UNOTOOLS_DLLPUBLIC OUString
GetDateTimeString(const css::util::DateTime
& _rDT
);
41 UNOTOOLS_DLLPUBLIC OUString
GetDateTimeString(sal_Int32 _nDate
, sal_Int32 _nTime
);
42 UNOTOOLS_DLLPUBLIC OUString
GetDateString(const css::util::DateTime
& _rDT
);
44 UNOTOOLS_DLLPUBLIC
void typeConvert(const Date
& _rDate
, css::util::Date
& _rOut
);
45 UNOTOOLS_DLLPUBLIC
void typeConvert(const css::util::Date
& _rDate
, Date
& _rOut
);
47 UNOTOOLS_DLLPUBLIC
void typeConvert(const DateTime
& _rDateTime
, css::util::DateTime
& _rOut
);
48 UNOTOOLS_DLLPUBLIC
void typeConvert(const css::util::DateTime
& _rDateTime
, DateTime
& _rOut
);
50 UNOTOOLS_DLLPUBLIC OUString
toISO8601(const css::util::DateTime
& _rDateTime
);
51 UNOTOOLS_DLLPUBLIC
bool ISO8601parseDateTime(const OUString
&i_rIn
, css::util::DateTime
& o_rDateTime
);
52 UNOTOOLS_DLLPUBLIC
bool ISO8601parseDate(const OUString
&i_rIn
, css::util::Date
& o_rDate
);
53 UNOTOOLS_DLLPUBLIC
bool ISO8601parseTime(const OUString
&i_rIn
, css::util::Time
& o_Time
);
57 #endif // INCLUDED_UNOTOOLS_DATETIME_HXX
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */