#include <locale.h>

#include <glib.h>

char *
format_date (const char *format)
{
  GDateTime *datetime;
  char *result;

  datetime = g_date_time_new_now_local ();

  result = g_date_time_format (datetime, format);

  g_date_time_unref (datetime);

  return result;
}

int
main(int argc, char **argv)
{
  setlocale (LC_ALL, "");

  g_printf ("%s\n", format_date ("%A, %B"));

  return;
}
