Re: [Vala] Date format



Yeah getting a localized datetime is really not idea right now but it's
also linked to the fact that there are plenty of contexts to represent
the time.
For elementary we introduced a helper in our Granite library to share
the translations and keep consistency in all of our apps:
https://github.com/elementary/granite/blob/master/lib/DateTime.vala#L38

On mer., 2018-03-28 at 12:04 +0200, rastersoft wrote:
Hi:

Is it possible to print from a GLib.Date only the date, without
the day
of week, neither the time, nor timezone?

Nearly a decade ago, I created GDateTime for GLib to give people a
modern API for dealing with these types of problems.

In fact I'm already using GDateTime, sorry. But I still have the
same 
problem: the FORMAT method only supports the same tags than
strftime(), 
so when I use %x, it returns the date in the right format, as
specified 
by the locale, but shows only two digits in the year, I can't choose
to 
use four. But even worse: I can't show only the date in the format 
"March 23, 2018" without using %c, but that adds some fields that I 
don't want, like the timezone, and always forces the time.
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]