Use LocalTime to format a date and time in the user's preferred locale format. This component requires JavaScript.
LocalTime
datetime
DateTime
initial_text
String
nil
weekday
Symbol
:short
:long
year
:numeric
:2-digit
month
day
hour
minute
second
time_zone_name
system_arguments
Hash
<%= render(Primer::LocalTime.new(datetime: DateTime.parse("2014-06-01T13:05:07Z"))) %>
<%= render(Primer::LocalTime.new(datetime: DateTime.parse("2014-06-01T13:05:07Z"), weekday: :long, year: :"2-digit", month: :long, day: :"2-digit", hour: :"2-digit", minute: :"2-digit", second: :"2-digit", time_zone_name: :long)) %>
<%= render(Primer::LocalTime.new(datetime: DateTime.parse("2014-06-01T13:05:07Z"))) do %> <!-- This content will be replaced once the component connects --> 2014/06/01 13:05<% end %>