Welcome Guest. Sign in or Signup

24 Comments

How to force the date string formats displayed in your pages to a specific culture?

Asked by: 15702 views
c) Localization

+1
0

The Date.js library contains variations of the Date object for than 150 cultures. By referencing the appropriate Date js file from the above library, you can force a specific format for the date strings shown in your pages.

For example:

<!-- Set the CultureInfo to de-DE (German/Deutsch) by referencing the below file instead of the date.js file.-->
<script type="text/javascript" src="date-de-DE.js"></script>

The formatPatterns of the Date object will be corresponding to the German culture as shown below:
Date.CultureInfo.formatPatterns for German culture

Code example:

var shortDate = Date.CultureInfo.formatPatterns.shortDate;
var localString = Date.today().toString( shortDate );
// for de-DE culture, the result is "08.05.2012"

24 Comments



  1. Tyson F. Gautreaux on Feb 26, 2014 Reply

    I just want to tell you that I am just all new to blogs and really savored your blog site. Most likely I’m planning to bookmark your blog . You really come with really good stories. With thanks for revealing your web-site.



  2. Likiaksa on Mar 12, 2014 Reply

    I’ve been browsing online more than three hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my opinion, if all website owners and bloggers made good content as you did, the net will be much more useful than ever before.…



  3. Louis Vuitton Outlet on Mar 25, 2014 Reply

    This is one awesome post. Much obliged.



  4. snort this on Apr 14, 2014 Reply

    Lovely just what I was searching for. Thanks to the author for taking his clock time on this one.



  5. Luigi Fulk on Apr 19, 2014 Reply

    I simply want to say I am new to blogs and actually savored this web site. Most likely I’m want to bookmark your blog post . You actually have amazing articles and reviews. Thanks for revealing your web page.



  6. Burton Haynes on May 18, 2014 Reply

    I just want to tell you that I’m very new to blogging and absolutely liked this blog. Likely I’m going to bookmark your blog . You surely have impressive article content. With thanks for sharing with us your web page.



  7. fishinglovers.net on Aug 25, 2014 Reply

    I am so grateful for your post.Thanks Again. Fantastic.



  8. my response on Sep 08, 2014 Reply

    I just want to mention I am all new to blogging and site-building and actually enjoyed this page. Most likely I’m planning to bookmark your blog post . You definitely have impressive writings. Cheers for sharing your webpage.



  9. steam shower cabinets on Sep 18, 2014 Reply

    awesome suggestions on this page , really helpful



  10. next on Sep 19, 2014 Reply

    I simply want to say I am very new to weblog and seriously savored this web-site. Likely I’m going to bookmark your website . You surely come with fabulous writings. With thanks for sharing your blog site.



  11. steam shower units on Sep 21, 2014 Reply

    amazing blog site site you have got, will certainly come again



  12. guaranteed facebook fans on Oct 24, 2014 Reply

    You have made some decent factors there. I looked over the internet for that issue and discovered plenty of people will associate with with your website.



  13. Stevie Drilling on Dec 08, 2014 Reply

    I wanted to draft you one little note just to say thank you again for these wonderful strategies you have documented in this case. It’s really tremendously open-handed with you to present extensively all a lot of folks could possibly have advertised for an electronic book to make some dough for themselves, chiefly now that you might well have tried it if you ever desired. These basics as well acted as the fantastic way to fully grasp other people have the identical zeal just like mine to know the truth more on the topic of this condition. I believe there are several more pleasurable situations in the future for individuals that go through your site.



  14. Back pain on Dec 20, 2014 Reply

    Wow, great article post.Much thanks again. Want more.



  15. Android review on Dec 22, 2014 Reply

    Im obliged for the article. Cool.



  16. Dallas Car Wreck Lawyers of 1800 Car Wreck on Facebook on Dec 28, 2014 Reply

    Fantastic article.Thanks Again. Fantastic.



  17. п»їM88 on Jan 14, 2015 Reply

    I truly appreciate this blog article.Much thanks again. Keep writing.



  18. water ionizers on Jan 23, 2015 Reply

    Thanks so much for the article.Thanks Again. Keep writing.



  19. Rencontres plan cul on Jan 24, 2015 Reply

    A round of applause for your blog post. Want more.



  20. useful source on Jan 26, 2015 Reply

    I just want to say I am beginner to blogging and site-building and absolutely enjoyed your blog site. Very likely I’m planning to bookmark your site . You actually have perfect stories. Regards for sharing your website page.



  21. tchat on Jan 27, 2015 Reply

    Thanks a lot for the post.Really looking forward to read more. Keep writing.



  22. use this link on Feb 05, 2015 Reply

    I just want to mention I am just newbie to blogs and seriously savored your page. Likely I’m planning to bookmark your website . You definitely come with perfect article content. Thanks for sharing with us your website.


Comments on Question