Re: [Vala] vala-list Digest, Vol 124, Issue 13



I bet this could be decided based on locale with gettext

2018-03-28 9:00 GMT-03:00 <vala-list-request gnome org>:

Send vala-list mailing list submissions to
        vala-list gnome org

To subscribe or unsubscribe via the World Wide Web, visit
        https://mail.gnome.org/mailman/listinfo/vala-list
or, via email, send a message with subject or body 'help' to
        vala-list-request gnome org

You can reach the person managing the list at
        vala-list-owner gnome org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of vala-list digest..."


Today's Topics:

   1. Re: Date format (rastersoft)
   2. Re: Date format (Al Thomas)


----------------------------------------------------------------------

Message: 1
Date: Wed, 28 Mar 2018 12:50:31 +0200
From: rastersoft <raster rastersoft com>
To: Al Thomas <astavale yahoo co uk>, vala-list gnome org
Subject: Re: [Vala] Date format
Message-ID: <bb61fb7a-c533-c5af-4c1d-defc25cae2e2 rastersoft com>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi:

Also, what
I really want is the date in the format "March 5, 2018", not
"03/05/18",
but it seems that only %c does that, but adds a lot of extra data
that I
don't want like the time zone.

As Christian Hergert suggests, DateTime is very useful. This works for
me:

void main () {
??? var date = new DateTime.now_local();
??? print (date.format("%B %e, %Y"));
}

That prints March 28, 2018 today. There are a whole load of formatting

Yes, but the problem is that, in Spain, we use the opposite format: we
write first the day's number, then the month's name, and finally the
year, so I need to know if in my current locale I have to "%B %e, %Y",
or "%e %B %Y" (without the comma), and so on... That's my problem. Using
'%c' does that, but adds a lot of extra information that I don't want,
like the timezone.


------------------------------

Message: 2
Date: Wed, 28 Mar 2018 11:53:28 +0000 (UTC)
From: Al Thomas <astavale yahoo co uk>
To: vala-list gnome org, rastersoft <raster rastersoft com>
Subject: Re: [Vala] Date format
Message-ID: <1758071266 393914 1522238008294 mail yahoo com>
Content-Type: text/plain; charset=UTF-8

  On Wednesday, 28 March 2018, 11:50:33 BST, rastersoft <
raster rastersoft com> wrote: > Yes, but the problem is that, in Spain,
we use the opposite format: we write first the day's number, > then the
month's name, and finally the year, so I need to know if in my current
locale I have > to "%B %e, %Y", or "%e %B %Y" (without the comma), and so
on... That's my problem. > Using '%c' does that, but adds a lot of extra
information that I don't want, like the timezone.
Aha, I understand now. I don't know the answer. There doesn't appear to be
a ready madesolution. I would say that here in the UK the format 28 March
2018 is often used. The same asin Spain. I know that in the USA a date
written as 5/3/2018 is the same as 3/5/2018 in the UK(03 May 2018). So
generally I go for day of the month, followed by word of the month and full
year.This at least helps makes the date unambiguous for the Gregorian
calendar. As long as thereader can distinguish the day, month and year.

I do also know that styles can change over time. So often in the UK a
datewas written 3rd May 2018. Then some years ago it was decided in my
workplace that this was tooold fashioned and it was changed to 3 May 2018.
This was for a public service dealing with millions of contacts a year from
all over the UK. Now I'm often seeing 03 May 2018.
May be it is just open to too much variation that it has never been coded
in to a library. Inessence it is better to convey the meaning of the date
unambiguously rather that meet thestylistic requirements of any locale.
I'm curious about the ordering of day, month, year for the Gregorian
calendar in other locales and if there is a library for that.
Regards,
Al



------------------------------

Subject: Digest Footer

_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list


------------------------------

End of vala-list Digest, Vol 124, Issue 13
******************************************



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