Top | ![]() |
![]() |
![]() |
![]() |
mrptime | mrp_time_current_time () |
mrptime | mrp_time_compose () |
gboolean | mrp_time_decompose () |
mrptime | mrp_time_from_string () |
gchar * | mrp_time_to_string () |
mrptime | mrp_time_align_day () |
mrptime | mrp_time_align_prev () |
mrptime | mrp_time_align_next () |
gint | mrp_time_day_of_week () |
gchar * | mrp_time_format () |
gchar * | mrp_time_format_locale () |
void | mrp_time_debug_print () |
GParamSpec * | mrp_param_spec_time () |
typedef | mrptime |
#define | MRP_TIME_INVALID |
#define | MRP_TIME_MIN |
#define | MRP_TIME_MAX |
enum | MrpTimeUnit |
ISO 8601 representation is done in the basic format.
Less separators are used:
20150101T000000Z
for 2015-01-01T00:00:00Z
.
mrptime
mrp_time_current_time (void
);
Retrieves the current time as 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.
t |
an mrptime value to decompose |
|
year |
location to store year, or |
|
month |
location to store month, or |
|
day |
location to store day, or |
|
hour |
location to store hour, or |
|
minute |
location to store minute, or |
|
second |
location to store second, or |
mrptime
mrp_time_from_string (const gchar *str
);
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.
mrptime mrp_time_align_prev (mrptime t
,MrpTimeUnit unit
);
Align t
to the previous unit
.
mrptime mrp_time_align_next (mrptime t
,MrpTimeUnit unit
);
Align t
to the next unit
.
gint
mrp_time_day_of_week (mrptime t
);
Retrieves the day of week of the specified time.
gchar * mrp_time_format (const gchar *format
,mrptime t
);
Formats a string with time values.
The allowed format codes are the same as for GDateTime.
gchar *
mrp_time_format_locale (mrptime t
);
Formats a string with time values. For format is the preferred for the current locale.
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.
#define MRP_TIME_MAX G_GINT64_CONSTANT(253402300799)
Represents the maximum value for mrptime.