Tizen(Headless) Native API  6.0
Date Interval

Date Interval represents a date interval.

Required Header

#include <utils_i18n.h>

Overview

The module represents a date interval.

Functions

int i18n_date_interval_create (i18n_udate from_date, i18n_udate to_date, i18n_date_interval_h *date_interval)
 Creates a date interval object.
int i18n_date_interval_destroy (i18n_date_interval_h date_interval)
 Destroys the date interval object.
int i18n_date_interval_clone (i18n_date_interval_h date_interval, i18n_date_interval_h *clone)
 Clones the date interval object.
int i18n_date_interval_get_from_date (i18n_date_interval_h date_interval, i18n_udate *from_date)
 Gets the 'from date' from a given date interval object.
int i18n_date_interval_get_to_date (i18n_date_interval_h date_interval, i18n_udate *to_date)
 Gets the 'to date' from a given date interval object.
int i18n_date_interval_equals (i18n_date_interval_h date_interval_1, i18n_date_interval_h date_interval_2, i18n_ubool *equals)
 Compares two date interval objects.

Typedefs

typedef void * i18n_date_interval_h
 An i18n_date_interval_h handle.

Typedef Documentation

typedef void* i18n_date_interval_h

An i18n_date_interval_h handle.

Use i18n_date_interval_* functions to operate on i18n_date_interval_h objects.

Since :
5.0

Function Documentation

Clones the date interval object.

Since :
5.0
Remarks:
The cloned object should be released by the caller with the i18n_date_interval_destroy() function.
Parameters:
[in]date_intervalThe date interval to be cloned
[out]cloneThe clone of the given date_interval object
Returns:
0 on success, otherwise a negative error value
Return values:
I18N_ERROR_NONESuccessful
I18N_ERROR_INVALID_PARAMETERInvalid function parameter
I18N_ERROR_OUT_OF_MEMORYOut of memory
int i18n_date_interval_create ( i18n_udate  from_date,
i18n_udate  to_date,
i18n_date_interval_h date_interval 
)

Creates a date interval object.

Since :
5.0
Remarks:
The created object should be released by the caller with the i18n_date_interval_destroy() function.
Parameters:
[in]from_dateThe start date of the date interval
[in]to_dateThe end date of the date interval
[out]date_intervalThe created date interval object
Returns:
0 on success, otherwise a negative error value
Return values:
I18N_ERROR_NONESuccessful
I18N_ERROR_INVALID_PARAMETERInvalid function parameter
I18N_ERROR_OUT_OF_MEMORYOut of memory

Destroys the date interval object.

Since :
5.0
Parameters:
[in]date_intervalThe date interval to be destroyed
Returns:
0 on success, otherwise a negative error value
Return values:
I18N_ERROR_NONESuccessful
I18N_ERROR_INVALID_PARAMETERInvalid function parameter
int i18n_date_interval_equals ( i18n_date_interval_h  date_interval_1,
i18n_date_interval_h  date_interval_2,
i18n_ubool equals 
)

Compares two date interval objects.

Since :
5.0
Parameters:
[in]date_interval_1The first date interval object
[in]date_interval_2The second date interval object
[out]equalsA flag set to true if given objects are equal, or false otherwise.
Returns:
0 on success, otherwise a negative error value
Return values:
I18N_ERROR_NONESuccessful
I18N_ERROR_INVALID_PARAMETERInvalid function parameter
int i18n_date_interval_get_from_date ( i18n_date_interval_h  date_interval,
i18n_udate from_date 
)

Gets the 'from date' from a given date interval object.

Since :
5.0
Parameters:
[in]date_intervalThe date interval object
[out]from_dateThe 'from date' value
Returns:
0 on success, otherwise a negative error value
Return values:
I18N_ERROR_NONESuccessful
I18N_ERROR_INVALID_PARAMETERInvalid function parameter
int i18n_date_interval_get_to_date ( i18n_date_interval_h  date_interval,
i18n_udate to_date 
)

Gets the 'to date' from a given date interval object.

Since :
5.0
Parameters:
[in]date_intervalThe date interval object
[out]to_dateThe 'to date' value
Returns:
0 on success, otherwise a negative error value
Return values:
I18N_ERROR_NONESuccessful
I18N_ERROR_INVALID_PARAMETERInvalid function parameter