[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] date, string formatting and locale
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] date, string formatting and locale |
Date: |
Wed, 3 Nov 2010 14:44:51 +0100 |
User-agent: |
Mutt/1.4.2.3i |
On Wed, Nov 03, 2010 at 10:29:14AM -0300, Hugo Arregui wrote:
> Hi guys,
>
> I'm facing some troubles getting a formatted string from a date.
>
> 1) Using posix:
>
> (use posix)
> (time->string (string->time "2" "%d"))
> "Tue Jan 2 00:00:00 1900"
>
> but, my current locale es:
>
> (use locale)
> (current-locale)
> "es_AR.utf8"
hmmm, I think time->string uses strftime(), so it depends on
whether your OS supports this. Can you verify that? (ie, what's
the output of date(2)?)
> 2) Trying srfi-19:
>
> srfi-19-io has a format-date, but what kind of format is using?
I guess it uses the more Schemely syntax from SRFI-19. See the SRFI
document for details: http://srfi.schemers.org/srfi-19/srfi-19.html
(search for "string->date")
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
- [Chicken-users] date, string formatting and locale, Hugo Arregui, 2010/11/03
- Re: [Chicken-users] date, string formatting and locale,
Peter Bex <=
- Re: [Chicken-users] date, string formatting and locale, Hugo Arregui, 2010/11/03
- Re: [Chicken-users] date, string formatting and locale, Peter Bex, 2010/11/03
- Re: [Chicken-users] date, string formatting and locale, Hugo Arregui, 2010/11/03
- Re: [Chicken-users] date, string formatting and locale, Hugo Arregui, 2010/11/03
- Re: [Chicken-users] date, string formatting and locale, Kon Lovett, 2010/11/03
- Re: [Chicken-users] date, string formatting and locale, Hugo Arregui, 2010/11/03
Re: [Chicken-users] date, string formatting and locale, Thomas Chust, 2010/11/03