2 * Copyright 2010-2014, Haiku, Inc.
3 * Distributed under the terms of the MIT Licence.
5 #ifndef _B_TIME_FORMAT_H_
6 #define _B_TIME_FORMAT_H_
9 #include <DateTimeFormat.h>
19 class BTimeFormat
: public BFormat
{
22 BTimeFormat(const BLanguage
& language
,
23 const BFormattingConventions
& conventions
);
24 BTimeFormat(const BTimeFormat
&other
);
25 virtual ~BTimeFormat();
27 void SetTimeFormat(BTimeFormatStyle style
,
28 const BString
& format
);
32 ssize_t
Format(char* string
, size_t maxSize
,
33 time_t time
, BTimeFormatStyle style
) const;
34 status_t
Format(BString
& string
, const time_t time
,
35 const BTimeFormatStyle style
,
36 const BTimeZone
* timeZone
= NULL
) const;
37 status_t
Format(BString
& string
,
38 int*& fieldPositions
, int& fieldCount
,
39 time_t time
, BTimeFormatStyle style
) const;
41 status_t
GetTimeFields(BDateElement
*& fields
,
42 int& fieldCount
, BTimeFormatStyle style
47 status_t
Parse(BString source
, BTimeFormatStyle style
,
48 BPrivate::BTime
& output
);
51 U_ICU_NAMESPACE::DateFormat
* _CreateTimeFormatter(
52 const BTimeFormatStyle style
) const;
56 #endif // _B_TIME_FORMAT_H_