Date.strftime

Generates a printed representation of the date, in a localesetlocale-specific way. Works just like the platform's C library strftime() function, but only accepts date-related formats; time-related formats give undefined results. Date must be valid. Unlike strftime() (which uses the locale encoding), works on a UTF-8 format string and stores a UTF-8 result.

This function does not provide any conversion specifiers in addition to those implemented by the platform's C library. For example, don't expect that using g_date_strftime() would make the \%F provided by the C99 strftime() work on Windows where the C library only complies to C89.

class Date
static
size_t
strftime
(
string s
,
size_t slen
,
string format
,)

Parameters

s string

destination buffer

slen size_t

buffer size

format string

format string

date Date

valid #GDate

Return Value

Type: size_t

number of characters written to the buffer, or 0 the buffer was too small

Meta