mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
Localise dates
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user