| Kipinä internals: reference Manual |
|---|
gboolean kp_date_valid (KPDate *date); void kp_date_set_time (KPDate *date, GTime time_); gboolean kp_is_valid_date_str (const gchar *date_str); gboolean kp_is_valid_time_str (const gchar *time_str); gboolean kp_is_valid_number (const gchar *possible_number); gdouble kp_is_valid_duration_entry_str (const gchar *time_str); gdouble kp_number (const gchar*); GValue* kp_g_value_from_string (const gchar *string); gchar* kp_g_value_to_string (const GValue *value); guint kp_get_month_len (guint m, gboolean is_leap); gboolean kp_leap (guint year); gboolean kp_week_of_year (guint *week, guint *year, guint mm, guint dd); glong kp_calc_days (guint year, guint mm, guint dd); guint kp_day_of_week (guint year, guint mm, guint dd); glong kp_dates_difference (guint year1, guint mm1, guint dd1, guint year2, guint mm2, guint dd2); guint kp_weeks_in_year (guint year); void kp_print_debug_string (const gchar *file, const gchar *function, guint line, const gchar *message, ...); gint kp_get_month_num (const gchar *m); gchar* kp_get_month_name (guint m); #define KP_TAG_MATCH (node,tagname) #define kp_debug (...)
gboolean kp_date_valid (KPDate *date);
Checks if this DMY is valid julian day.
| date : | A |
| Returns : | TRUE if date is valid and FALSE otherwise. |
void kp_date_set_time (KPDate *date,
GTime time_);Used to create
| date : | |
| time_ : | time value, just like time_t |
gboolean kp_is_valid_number (const gchar *possible_number);
Find out if the string contains some numeric data.
| possible_number : | String that may contain a valid numeric value |
| Returns : | TRUE if string contains numeric data only and FALSE otherwise. |
gdouble kp_is_valid_duration_entry_str (const gchar *time_str);
| time_str : | |
| Returns : |
|
gdouble kp_number (const gchar*);
Try to parse a string to a double.
| Param1 : | |
| Returns : | The double value if possible_number is valid and 0.0 otherwise. |
guint kp_get_month_len (guint m,
gboolean is_leap);Get number of days in the month.
| m : | Number of the month (0-11) |
| is_leap : | TRUE if the year which the month is in, is a leap year |
| Returns : | Number of the days or 0 if month number is invalid. |
gboolean kp_week_of_year (guint *week,
guint *year,
guint mm,
guint dd);| week : | |
| year : | |
| mm : | |
| dd : | |
| Returns : |
|
glong kp_dates_difference (guint year1,
guint mm1,
guint dd1,
guint year2,
guint mm2,
guint dd2);| year1 : | |
| mm1 : | |
| dd1 : | |
| year2 : | |
| mm2 : | |
| dd2 : | |
| Returns : |
|
void kp_print_debug_string (const gchar *file,
const gchar *function,
guint line,
const gchar *message,
...);| file : | |
| function : | |
| line : | |
| message : | |
| ... : |
|
gint kp_get_month_num (const gchar *m);
Get number of the month.
| m : | localized month name. |
| Returns : | The number of the month between 0 and 11 or -1 if the month is invalid. |
gchar* kp_get_month_name (guint m);
Get localized month name.
| m : | month number between 0 and 11 |
| Returns : | Newly-allocated string that must be freed or NULL if m is invalid. |
#define KP_TAG_MATCH(node,tagname) (xmlStrcasecmp(((xmlNodePtr)node)->name,tagname) == 0)
| node : | |
| tagname : |
|
| <<< kparray2d |