-
Notifications
You must be signed in to change notification settings - Fork 40
Date Format
One of the most commonly asked questions on this forum is how to get the date format to be something other than mm/dd/yy.
It should be noted that this is not controlled by the Events Module. The module formats dates using standard date strings which present date according the Culture or Language specified in the user or portal settings. Therefore the module can be presented to users in multiple languages with dates being presented as appropriate for all users.
Language detection works differently for users who are logged in or not:
-
Not logged in - DNN will by default check the browser language, which is often set to en-US by default. Enable Browser Language Detection can be found in the Language Settings dialogue in Admin/Languages in DNN 5.x. Other than that it will use the portal default settings set in Admin/Languages.
-
Logged in - it uses the languages set in the users profile - User Settings/Manage Profile.
The way to set this up correctly is to:
- Install Language
* Install the languages you require via the Languages dialogue (DNN 4.x in the Host menu, DNN 5.x/6.x in the Admin menu) or ask your service provider to add any that you need. For UK English you will need to install English (UK)- en-GB.
* In this dialogue I typically disable browser language detection, because often browsers are configured to en-US as default.
- Configure your Site
* In DNN 4/5 in the Site Settings dialogue in the Admin menu, under Advanced Settings, then Other Settings, configure the default language.
* In DNN 6 in the Admin/Language dialogue set the Site Default.
- Configure your Users
* For each user (and this is best done when you first set up the site, because they pick up the default you just specified in the Site Settings), change the Preferred Locale in the Manage Profile section of their user profile.
Dates should now display in the correct format. For the UK (and I'm sure for other counries as well), it will also show weeks starting on a Monday rather than a Sunday which is the norm in the US.
Introduction System Requirements
- Events Module settings
- Date Format
- Event dates without time
- Event details in place or not
- Event Settings
- Event Themes
- Event Views
- Templating Event Views
- Purge old events
- Custom Event themes
- Select Category via URL
- Select Start Date via URL
- RSS in the Events Module
- iCal support
- Upcoming Events View
- Repeater view
- Video Tutorials
- Open Location URL
- The use of Templates
- Tokens to be used in Templates
- Daylight Saving Time
- The same Events on two pages
- Install module for Development