DateTimeFormat.h revision e3857211
1/*
2 * Copyright 2010-2014, Haiku, Inc.
3 * Distributed under the terms of the MIT Licence.
4 */
5#ifndef _B_DATE_TIME_FORMAT_H_
6#define _B_DATE_TIME_FORMAT_H_
7
8
9#include <DateFormat.h>
10#include <Format.h>
11#include <FormatParameters.h>
12#include <TimeFormat.h>
13
14
15class BString;
16
17
18class BDateTimeFormat : public BFormat {
19public:
20								BDateTimeFormat();
21								BDateTimeFormat(const BDateTimeFormat &other);
22	virtual						~BDateTimeFormat();
23
24								// formatting
25
26			ssize_t				Format(char* target, const size_t maxSize,
27									const time_t time,
28									BDateFormatStyle dateStyle,
29									BTimeFormatStyle timeStyle) const;
30			status_t			Format(BString& buffer, const time_t time,
31									BDateFormatStyle dateStyle,
32									BTimeFormatStyle timeStyle,
33									const BTimeZone* timeZone = NULL) const;
34
35private:
36			icu::DateFormat*	_CreateDateFormatter(
37									const BString& format) const;
38			icu::DateFormat*	_CreateTimeFormatter(
39									const BString& format) const;
40};
41
42
43#endif	// _B_DATE_TIME_FORMAT_H_
44