Calling DateTime.now().format()
results in '28/08/2012 16:20' for current user locale 'French (France)' & '8/28/2012 4:20 PM' for current user locale 'English (United States)'.
Calling DateTime.now().date().format()
results in '28/08/2012' for current user locale 'French (France)' & 8/28/2012
for current user locale 'English (United States)'.
Ideally a Time.format()
instance method would exist so that DateTime.now().time().format()
results in '16:20' for current user locale 'French (France)' & '4:20 PM' for current user locale 'English (United States)'.
Please suggest any and all locale sensitive workarounds for formatting the Time part only.
In my particular case, I'm not displaying this Time part only to the user via Visualforce, so an Apex workaround is what I'm looking for.