• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can we set a specific date pattern for our app/webapp

 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can we set a specific date pattern for our application or web application without doing any work around by ourselves.

I have looked into Locale class but couldn't find anything I want. As we can set a default locale for a JVM instance. Just like the same can we set a specific date format for a JVM instance.

Moreover, can we set a locale for our application/web application not for a JVM instance. I looked into web application internationalization but it is not talking about seting a default locale or default date pattern for a web application.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at the DateFormatter and DateFormat classes in the Java API Javadocs.

Mark
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Infact I have looked into DateFormat, DateFormatter, SimpleDateFormat, but I didn't find anything where I can set my specific date pattern for the whole application. I mean to say that if some other developer use,



in my application then it would suppose to print the date in the format I have already set.

So please folks, help me out. I know I can do it with some other custom utility classes but I dont wanna go for that. I just want to set a particular date pattern as a default to my whole app.

Thanks for your reply.
[ July 28, 2005: Message edited by: Adeel Ansari ]
 
Seriously Rick? Seriously? You might as well just read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic