<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Non-US Date and Time formatting in the ui:input-date &amp; time tags</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=1096996" />
  <subtitle>Non-US Date and Time formatting in the ui:input-date &amp; time tags</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=1096996</id>
  <updated>2026-06-07T16:13:16Z</updated>
  <dc:date>2026-06-07T16:13:16Z</dc:date>
  <entry>
    <title>RE: Non-US Date and</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6441611" />
    <author>
      <name>Jakub Liska</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=6441611</id>
    <updated>2010-11-14T23:56:37Z</updated>
    <published>2010-11-14T23:56:37Z</published>
    <summary type="html">Hi Jasper,&lt;br /&gt;&lt;br /&gt;I&amp;#39;m not sure how do you mean this&lt;br /&gt;&lt;blockquote&gt;So I found that by extracting the formatting pattern from getDateInstance() and getTimeInstance() it is possible to determine if the default time format is AM/PM or 24h, and if the default date order is MDY or YMD.&lt;/blockquote&gt;&lt;br /&gt;When these liferay-ui:input-date/time are used, request is populated with all the particular time/date values (Integers) that you can get separately .... I don&amp;#39;t see any DateFormat I could call these methods on to find out whether the request came from somebody from US or EU</summary>
    <dc:creator>Jakub Liska</dc:creator>
    <dc:date>2010-11-14T23:56:37Z</dc:date>
  </entry>
  <entry>
    <title>RE: Non-US Date and</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=1101153" />
    <author>
      <name>Jesper W</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=1101153</id>
    <updated>2008-07-23T12:10:17Z</updated>
    <published>2008-07-23T12:10:17Z</published>
    <summary type="html">Oki, patch contributed in LEP-6827</summary>
    <dc:creator>Jesper W</dc:creator>
    <dc:date>2008-07-23T12:10:17Z</dc:date>
  </entry>
  <entry>
    <title>Re: [Liferay Forums][Liferay Core Developers] RE: Non-US Date and Time form</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=1100340" />
    <author>
      <name>Jorge Ferrer</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=1100340</id>
    <updated>2008-07-23T09:08:31Z</updated>
    <published>2008-07-23T09:08:31Z</published>
    <summary type="html">Sounds good to me</summary>
    <dc:creator>Jorge Ferrer</dc:creator>
    <dc:date>2008-07-23T09:08:31Z</dc:date>
  </entry>
  <entry>
    <title>RE: Non-US Date and Time formatting in the ui:input-date &amp; ti</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=1100288" />
    <author>
      <name>Jesper W</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=1100288</id>
    <updated>2008-07-23T09:00:57Z</updated>
    <published>2008-07-23T09:00:57Z</published>
    <summary type="html">So I found that by extracting the formatting pattern from getDateInstance() and getTimeInstance() it is possible to determine if the default time format is AM/PM or 24h, and if the default date order is MDY or YMD.&lt;br /&gt;&lt;br /&gt;I can easily get input-field and input-time to adhere to this &lt;strong&gt;without&lt;/strong&gt; any need to change any of the Action classes that process the input, since the Action classes just add 12h if the hour value is PM.&lt;br /&gt;&lt;br /&gt;It&amp;#39;s quite easy to change the display order of input-date too, but since the display order is determined by the order the tags appear in the HTML I would need to duplicate the year, month and day &amp;lt;select&amp;gt; tags in input-date/page.jsp. &lt;br /&gt;&lt;br /&gt;Would this be considered OK?&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t like code duplication, but the only alternative I can think of is to extract month, day and year &amp;lt;select&amp;gt;&amp;#39;s into 3 separate .jspf&amp;#39;s, and then include them in different order depending on the Locales preferred order.</summary>
    <dc:creator>Jesper W</dc:creator>
    <dc:date>2008-07-23T09:00:57Z</dc:date>
  </entry>
  <entry>
    <title>RE: Non-US Date and Time formatting in the ui:input-date &amp; ti</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=1097642" />
    <author>
      <name>Jorge Ferrer</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=1097642</id>
    <updated>2008-07-22T16:04:11Z</updated>
    <published>2008-07-22T16:04:11Z</published>
    <summary type="html">Hi Jesper,&lt;br /&gt;&lt;br /&gt;Ideally it should use the locale of the current user. Actually it&amp;#39;s already using that within the taglib/ui/input_time/page.jsp to format the individual numbers.&lt;br /&gt;&lt;br /&gt;The hard part could be adapting all the actions (or classes reading those params in general) so that they can read the fields in the appropriate locale.</summary>
    <dc:creator>Jorge Ferrer</dc:creator>
    <dc:date>2008-07-22T16:04:11Z</dc:date>
  </entry>
  <entry>
    <title>Non-US Date and Time formatting in the ui:input-date &amp; time tags</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=1096995" />
    <author>
      <name>Jesper W</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=1096995</id>
    <updated>2008-07-22T14:07:51Z</updated>
    <published>2008-07-22T14:07:51Z</published>
    <summary type="html">I&amp;#39;d like to make the &amp;lt;liferay-ui:input_xxx&amp;gt; tags for date and time adopt to European standards:&lt;br /&gt;&lt;br /&gt;- 24h time format instead of AM/PM&lt;br /&gt;- Y-M-D ordering of the date selectors.&lt;br /&gt;&lt;br /&gt;AFAICS there is no info in Locale, GregorianCalendar or SimpleDateFormatter about what format is the standard in different locales.&lt;br /&gt;The only way I can think of right now is to add a property to select what format should be used.&lt;br /&gt;&lt;br /&gt;Anyone with better ideas?&lt;br /&gt;&lt;br /&gt;/jesper</summary>
    <dc:creator>Jesper W</dc:creator>
    <dc:date>2008-07-22T14:07:51Z</dc:date>
  </entry>
</feed>
