haiku/headers/os/locale/DurationFormat.h
Oliver Tappe 45f2f22b52 * update (not-so-)optional package ICU to 4.8.1, which contains interesting stuff
for message formatting
* adjust LocaleKit to use namespace 'icu', as ICU has been configured to no longer
  use a version specific namespace
* adjust LocaleKit to general API changes in ICU 4.8
Note: all software using ICU (like WebPositive) needs to be rebuilt!
Note: the ICU package for PPC needs to be updated before it can be used!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-18 22:13:06 +00:00

50 lines
1.0 KiB
C++

/*
* Copyright 2010-2011, Haiku, Inc.
* Distributed under the terms of the MIT License.
*/
#ifndef _B_DURATION_FORMAT_H_
#define _B_DURATION_FORMAT_H_
#include <Format.h>
#include <String.h>
#include <TimeUnitFormat.h>
class BTimeZone;
namespace icu {
class GregorianCalendar;
}
class BDurationFormat : public BFormat {
typedef BFormat Inherited;
public:
BDurationFormat(
const BString& separator = ", ");
BDurationFormat(const BDurationFormat& other);
virtual ~BDurationFormat();
BDurationFormat& operator=(const BDurationFormat& other);
void SetSeparator(const BString& separator);
virtual status_t SetLocale(const BLocale* locale);
status_t SetTimeZone(const BTimeZone* timeZone);
status_t Format(bigtime_t startValue,
bigtime_t stopValue, BString* buffer,
time_unit_style style = B_TIME_UNIT_FULL
) const;
private:
BString fSeparator;
BTimeUnitFormat fTimeUnitFormat;
icu::GregorianCalendar* fCalendar;
};
#endif