Localise dates

This commit is contained in:
Steve Pettitt
2016-02-24 20:33:37 +00:00
parent c07fefde1a
commit 8e88cd6255
2 changed files with 2 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ class Api::OrderSerializer < ActiveModel::Serializer
has_many :payments, serializer: Api::PaymentSerializer
def completed_at
object.completed_at.blank? ? "" : object.completed_at.to_formatted_s(:long_ordinal)
object.completed_at.blank? ? "" : I18n.l(object.completed_at, format: :long) #.to_formatted_s(:long_ordinal)
end
def total

View File

@@ -9,6 +9,6 @@ class Api::PaymentSerializer < ActiveModel::Serializer
end
def updated_at
object.updated_at.to_formatted_s(:long_ordinal)
I18n.l(object.updated_at, format: :long)
end
end