LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] the first day of the week?

[ILUG] the first day of the week?

A. Dreyer - ILUG ml10022 at adreyer.com
Wed Mar 4 11:58:57 GMT 2009


On Wed, 04 Mar 2009, Pádraig Brady wrote:

> As the following script shows, the locale for IE on linux
> has Sunday as the first day of the week. I always think
> of Sunday as the last day and the UK locale concurs.
> Where could I lookup the "right" answer?
> 
> for LANG in en_IE en_GB; do
>   date -d"$(locale week-1stday) +$(($(locale first_weekday)-1))day" +%a
> done
> 
> Sun
> Mon

Hi,

What happens if you replace LANG with LC_TIME?

$$ for LC_TIME in en_IE en_GB en_US de_DE; do
  date -d"$(locale week-1stday) +$(($(locale first_weekday)-1))day" +%a;
done

Mon
Mon
Sun
Mo



Achim

-- 
Achim Dreyer                || http://www.adreyer.com/
Senior Unix & Network Admin || RHCE, RHCA, CCSA, CCSE, CCNA
Phone: +44 7756 948229      || CACert assurer




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell