
System.Locale.defaultTimeLocale, which appears to be taken directly from the Haskell report, is hard-coded to american english settings... which seems to defeat the purpose of the module. Are there plans to provide the actual locale?
I have users who would like to have their times formatted according to their own locale. I'd rather not have to do this using the FFI to access the C library. :(
We can't change Locale.defaultTimeLocale, because the Haskell 98 report specifies it. OTOH, I agree that it should do something reasonable. We can change System.Locale.defaultTimeLocale to be locale-specific: if you have some code, I'll incorporate it (assuming there are no objections). Cheers, Simon

On Tue, Apr 13, 2004 at 01:50:11PM +0100, Simon Marlow wrote:
System.Locale.defaultTimeLocale, which appears to be taken directly from the Haskell report, is hard-coded to american english settings... which seems to defeat the purpose of the module. Are there plans to provide the actual locale?
I have users who would like to have their times formatted according to their own locale. I'd rather not have to do this using the FFI to access the C library. :(
We can't change Locale.defaultTimeLocale, because the Haskell 98 report specifies it. OTOH, I agree that it should do something reasonable. We can change System.Locale.defaultTimeLocale to be locale-specific: if you have some code, I'll incorporate it (assuming there are no objections).
I have code to get the current time format and various other locale settings at http://repetae.net/john/computer/haskell/Locale.hsc setupLocale needs to be called at least once, but I think it is not necessary because the ghc runtime does the equivalant. John -- John Meacham - ⑆repetae.net⑆john⑈
participants (2)
-
John Meacham
-
Simon Marlow