Top | ![]() |
![]() |
![]() |
![]() |
mrptime | mrp_time_current_time () |
mrptime | mrp_time_from_tm () |
mrptime | mrp_time_compose () |
gboolean | mrp_time_decompose () |
mrptime | mrp_time_from_string () |
gchar * | mrp_time_to_string () |
mrptime | mrp_time_from_msdate_string () |
mrptime | mrp_time_align_day () |
gint | mrp_time_day_of_week () |
gint | mrp_time_week_number () |
const gchar * | mrp_time_day_name () |
const gchar * | mrp_time_month_name () |
const gchar * | mrp_time_month_name_initial () |
gchar * | mrp_time_format () |
void | mrp_time_debug_print () |
GParamSpec * | mrp_param_spec_time () |
mrptime
mrp_time_current_time (void
);
Retrieves the current time as an mrptime value.
mrptime
mrp_time_from_tm (struct tm *tm
);
Converts a struct tm value to an mrptime value.
mrptime mrp_time_compose (gint year
,gint month
,gint day
,gint hour
,gint minute
,gint second
);
Composes an mrptime value from the separate components.
gboolean mrp_time_decompose (mrptime t
,gint *year
,gint *month
,gint *day
,gint *hour
,gint *minute
,gint *second
);
Splits up an mrptime value into its components.
mrptime mrp_time_from_string (const gchar *str
,GError **err
);
Parses an ISO8601 time string and converts it to an mrptime.
gchar *
mrp_time_to_string (mrptime t
);
Converts a time value to an ISO8601 string.
mrptime
mrp_time_align_day (mrptime t
);
Aligns a time value to the start of the day.
gint
mrp_time_day_of_week (mrptime t
);
Retrieves the day of week of the specified time.
gint
mrp_time_week_number (mrptime t
);
Retrieves the week number of the specified time.
const gchar *
mrp_time_day_name (mrptime t
);
Retrieves the name of the day of the specified time.
const gchar *
mrp_time_month_name (mrptime t
);
Retrieves the name of the month of the specified time.
const gchar *
mrp_time_month_name_initial (mrptime t
);
Retrieves the initial letter for the month of the specified time.
gchar * mrp_time_format (const gchar *format
,mrptime t
);
Formats a string with time values. The following format codes are allowed:
%a The abbreviated weekday name (Mon, Tue, ...) %A The full weekday name (Monday, Tuesday, ...) %b The abbreviated month name (Jan, Feb, ...) %B The full month name (January, February, ...) %d The day of the month (01 - 31). %e The day of the month (1 - 31). %H The hour using a 24-hour clock (00 - 23). %I The hour using a 12-hour clock (01 - 12). %j The day of the year (001 - 366). %k The hour using a 24-hour clock (0 to 23). %l The hour using a 12-hour clock (1 - 12). %m The month number (01 to 12). %M The minute (00 - 59). %p Either 'AM' or 'PM' according to the given time value. %P Like %p but in lowercase. %R The time in 24 hour notation (%H:%M). %S The second (00 - 61). %U The week number, (1 - 53), starting with the first Sunday as the first day of week 1. %W The week number, (1 - 53), starting with the first Monday as the first day of week 1. %y The year without a century (range 00 to 99). %Y The year including the century.
void
mrp_time_debug_print (mrptime t
);
Prints the time on stdout, for debugging purposes.
GParamSpec * mrp_param_spec_time (const gchar *name
,const gchar *nick
,const gchar *blurb
,GParamFlags flags
);
Convenience function for creating a GParamSpec carrying an mrptime value.