ICU 54.1  54.1
Data Structures | Namespaces | Typedefs | Enumerations
reldatefmt.h File Reference

C++ API: Formats relative dates such as "1 day ago" or "tomorrow". More...

#include "unicode/utypes.h"
#include "unicode/uobject.h"
#include "unicode/udisplaycontext.h"
#include "unicode/locid.h"

Go to the source code of this file.

Data Structures

class  icu::RelativeDateTimeFormatter
 Formats simple relative dates. More...
 

Namespaces

 icu
 File coll.h.
 

Typedefs

typedef enum
UDateRelativeDateTimeFormatterStyle 
UDateRelativeDateTimeFormatterStyle
 The formatting style. More...
 
typedef enum UDateRelativeUnit UDateRelativeUnit
 Represents the unit for formatting a relative date. More...
 
typedef enum UDateAbsoluteUnit UDateAbsoluteUnit
 Represents an absolute unit. More...
 
typedef enum UDateDirection UDateDirection
 Represents a direction for an absolute unit e.g "Next Tuesday" or "Last Tuesday". More...
 

Enumerations

enum  UDateRelativeDateTimeFormatterStyle { UDAT_STYLE_LONG, UDAT_STYLE_SHORT, UDAT_STYLE_NARROW, UDAT_STYLE_COUNT }
 The formatting style. More...
 
enum  UDateRelativeUnit {
  UDAT_RELATIVE_SECONDS, UDAT_RELATIVE_MINUTES, UDAT_RELATIVE_HOURS, UDAT_RELATIVE_DAYS,
  UDAT_RELATIVE_WEEKS, UDAT_RELATIVE_MONTHS, UDAT_RELATIVE_YEARS, UDAT_RELATIVE_UNIT_COUNT
}
 Represents the unit for formatting a relative date. More...
 
enum  UDateAbsoluteUnit {
  UDAT_ABSOLUTE_SUNDAY, UDAT_ABSOLUTE_MONDAY, UDAT_ABSOLUTE_TUESDAY, UDAT_ABSOLUTE_WEDNESDAY,
  UDAT_ABSOLUTE_THURSDAY, UDAT_ABSOLUTE_FRIDAY, UDAT_ABSOLUTE_SATURDAY, UDAT_ABSOLUTE_DAY,
  UDAT_ABSOLUTE_WEEK, UDAT_ABSOLUTE_MONTH, UDAT_ABSOLUTE_YEAR, UDAT_ABSOLUTE_NOW,
  UDAT_ABSOLUTE_UNIT_COUNT
}
 Represents an absolute unit. More...
 
enum  UDateDirection {
  UDAT_DIRECTION_LAST_2, UDAT_DIRECTION_LAST, UDAT_DIRECTION_THIS, UDAT_DIRECTION_NEXT,
  UDAT_DIRECTION_NEXT_2, UDAT_DIRECTION_PLAIN, UDAT_DIRECTION_COUNT
}
 Represents a direction for an absolute unit e.g "Next Tuesday" or "Last Tuesday". More...
 

Detailed Description

C++ API: Formats relative dates such as "1 day ago" or "tomorrow".

Definition in file reldatefmt.h.

Typedef Documentation

Represents an absolute unit.

Draft:
This API may be changed in the future versions and was introduced in ICU 53

Represents a direction for an absolute unit e.g "Next Tuesday" or "Last Tuesday".

Draft:
This API may be changed in the future versions and was introduced in ICU 53

The formatting style.

Draft:
This API may be changed in the future versions and was introduced in ICU 54

Represents the unit for formatting a relative date.

e.g "in 5 days" or "in 3 months"

Draft:
This API may be changed in the future versions and was introduced in ICU 53

Enumeration Type Documentation

Represents an absolute unit.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
Enumerator
UDAT_ABSOLUTE_SUNDAY 

Sunday.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_MONDAY 

Monday.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_TUESDAY 

Tuesday.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_WEDNESDAY 

Wednesday.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_THURSDAY 

Thursday.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_FRIDAY 

Friday.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_SATURDAY 

Saturday.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_DAY 

Day.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_WEEK 

Week.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_MONTH 

Month.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_YEAR 

Year.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_NOW 

Now.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_ABSOLUTE_UNIT_COUNT 

Count of items in this enum.

Draft:
This API may be changed in the future versions and was introduced in ICU 53

Definition at line 120 of file reldatefmt.h.

Represents a direction for an absolute unit e.g "Next Tuesday" or "Last Tuesday".

Draft:
This API may be changed in the future versions and was introduced in ICU 53
Enumerator
UDAT_DIRECTION_LAST_2 

Two before.

Not fully supported in every locale.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_DIRECTION_LAST 

Last.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_DIRECTION_THIS 

This.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_DIRECTION_NEXT 

Next.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_DIRECTION_NEXT_2 

Two after.

Not fully supported in every locale.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_DIRECTION_PLAIN 

Plain, which means the absence of a qualifier.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_DIRECTION_COUNT 

Count of items in this enum.

Draft:
This API may be changed in the future versions and was introduced in ICU 53

Definition at line 208 of file reldatefmt.h.

The formatting style.

Draft:
This API may be changed in the future versions and was introduced in ICU 54
Enumerator
UDAT_STYLE_LONG 

Everything spelled out.

Draft:
This API may be changed in the future versions and was introduced in ICU 54
UDAT_STYLE_SHORT 

Abbreviations used when possible.

Draft:
This API may be changed in the future versions and was introduced in ICU 54
UDAT_STYLE_NARROW 

Use the shortest possible form.

Draft:
This API may be changed in the future versions and was introduced in ICU 54
UDAT_STYLE_COUNT 

The number of styles.

Draft:
This API may be changed in the future versions and was introduced in ICU 54

Definition at line 33 of file reldatefmt.h.

Represents the unit for formatting a relative date.

e.g "in 5 days" or "in 3 months"

Draft:
This API may be changed in the future versions and was introduced in ICU 53
Enumerator
UDAT_RELATIVE_SECONDS 

Seconds.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_RELATIVE_MINUTES 

Minutes.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_RELATIVE_HOURS 

Hours.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_RELATIVE_DAYS 

Days.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_RELATIVE_WEEKS 

Weeks.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_RELATIVE_MONTHS 

Months.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_RELATIVE_YEARS 

Years.

Draft:
This API may be changed in the future versions and was introduced in ICU 53
UDAT_RELATIVE_UNIT_COUNT 

Count of items in this enum.

Draft:
This API may be changed in the future versions and was introduced in ICU 53

Definition at line 65 of file reldatefmt.h.