ITK Function Reference

(V10000.1.0.60_20160308.00)
Macros | Functions
tccalendar.h File Reference
#include <unidefs.h>
#include <sa/sa.h>
#include <sa/libsa_exports.h>
#include <sa/libsa_undef.h>

Go to the source code of this file.

Macros

#define TCCALENDAR_name_size_c   256
 

Functions

int SA_API TCCALENDAR_create_tccalendar (int tccal_type, tag_t base_calendar, tag_t schedule, tag_t resource, const char *tccal_name, const char *tccal_desc, int num_sun_ranges, tag_t *sun_ranges, int num_mon_ranges, tag_t *mon_ranges, int num_tue_ranges, tag_t *tue_ranges, int num_wed_ranges, tag_t *wed_ranges, int num_thu_ranges, tag_t *thu_ranges, int num_fri_ranges, tag_t *fri_ranges, int num_sat_ranges, tag_t *sat_ranges, const char *time_zone, tag_t *newtccalendar)
 
SA_API int TCCALENDAR_delete_tccalendar (tag_t tccalendar)
 
SA_API int TCCALENDAR_find_end_date (date_t start_date, tag_t user_tag, unsigned int years, unsigned int weeks, unsigned int days, unsigned int hours, unsigned int minutes, date_t *end_date)
 
SA_API int TCCALENDAR_get_base_tccalendar (tag_t *tccalendar)
 
SA_API int TCCALENDAR_get_resource_non_working_dates (tag_t resource, char *fromDate, char *toDate, int *no_of_nonwd, char ***nonWorkingDates)
 
SA_API int TCCALENDAR_get_resource_tccalendar (tag_t resource, tag_t *tccalendar)
 
SA_API int TCCALENDAR_get_schedule_tccalendar (tag_t schedule, tag_t *tccalendar)
 
SA_API int TCCALENDAR_get_tccalendar_by_name (const char tccalname[SA_user_size_c+1], tag_t *tccalendar)
 
SA_API int TCCALENDAR_get_tccalendar_by_name2 (const char *tccalname, tag_t *tccalendar)
 
SA_API int TCCALENDAR_get_tccalendar_name (tag_t tccal, char **tccalName)
 
SA_API int TCCALENDAR_update_tccalendar (tag_t tccalendar, int num_sun_ranges, tag_t *sun_ranges, int num_mon_ranges, tag_t *mon_ranges, int num_tue_ranges, tag_t *tue_ranges, int num_wed_ranges, tag_t *wed_ranges, int num_thu_ranges, tag_t *thu_ranges, int num_fri_ranges, tag_t *fri_ranges, int num_sat_ranges, tag_t *sat_ranges)
 

Detailed Description

library exports header file

Definition in file tccalendar.h.

Function Documentation

SA_API int TCCALENDAR_find_end_date ( date_t  start_date,
tag_t  user_tag,
unsigned int  years,
unsigned int  weeks,
unsigned int  days,
unsigned int  hours,
unsigned int  minutes,
date_t end_date 
)

Computes the end date based on the calendar of the given user, the start date and the duration.
It also leverages the values specified in the preference "SM_Hours_Per_Day_Preference", "SM_Hours_Per_Week_Preference", "SM_Hours_Per_Year_Preference" to determine respectively the working hours per day, working hours per week and working hours per year.
If the user_tag is NULLTAG, the default calendar is used.

Returns
  • ITK_ok on success
  • SA_tccalendar_invalid_calendar_input error if the start date is null or invalid (if the month is greater than 12, the day is greater than 31, the hour is greater than 23, the minute is greater than 59, the second is greater than 59).
  • SA_tccalendar_duration_too_long if either number of years, weeks, days, hours or minutes is too large, i.e. years greater than 98, weeks greater than 7144, days greater than 35716, hours greater than 285728, minutes greater than 17143680.
Parameters
start_date(I) The start date in local server time zone.
user_tag(I) The user which calendar is used
If the provided user is not specified or the user calendar is not set, the default calendar is used.
years(I) Duration in years. It must be less than 98
weeks(I) Duration in weeks. It must be less than 7144
days(I) Duration in days. It must be less than 35716
hours(I) Duration in hours. It must be less than 285728
minutes(I) Duration in minutes. It must be less than 17143680
end_date(O) The computed end date in local server time zone.