RelativeDateFormat

Since: BlackBerry 10.2.0

#include <bb/utility/i18n/RelativeDateFormat>

To link against this class, add the following line to your .pro file: LIBS += -lbbutilityi18n

A list of supported relative date/time formatters.


Overview

Public Types Index

enum Type

TimeCritical = 1, NonTimeCritical = 2

Public Types

Type

The list of supported relative date/time formaters.

Since:

BlackBerry 10.2.0

TimeCritical = 1

The default relative date/time formatter.

This type of RelativeDateFormatter should be used when time information is important. For example, scheduled calendar events, when a message/notification/call was received/sent, etc.

date-time range

example

past years

March 2012

same year; past 4+ days

Jan 20

past 2-3 days

Mon 1:01PM

previous day

Yesterday 1:01PM

same day; 1+ hours ago

3 hours ago

less than an hour ago

10 minutes ago

in less than an hour

in 10 minutes

same day; in 1+ hours

in 3 hours

following day

Tomorrow 1:01PM

future 2-3 days

Sat 1:01PM

same year; future 4+ days

Dec 20

future years

March 2014

Since:

BlackBerry 10.2.0

NonTimeCritical = 2

A relative date/time formatter without time.

This type of RelativeDateFormatter should be used when the user does not care about the specific time. For example, when software was last updated, friends' birthdays, holidays, etc.

date-time range

example

past years

March 2012

same year; past 4+ days

Jan 20

past 2-3 days

Monday

previous day

Yesterday

same day

Today

following day

Tomorrow

future 2-3 days

Saturday

same year; future 4+ days

Dec 20

future years

March 2014

Since:

BlackBerry 10.2.0

Last modified: 2014-03-13

comments powered by Disqus