use to_date for locale based formating

This commit is contained in:
Ahmed Ejaz
2024-10-09 00:56:57 +05:00
committed by Rachel Arnould
parent 68c0d98736
commit ec0d2d346b
3 changed files with 9 additions and 9 deletions

View File

@@ -44,7 +44,7 @@ module Reporting
end
def order_date
proc { |line_items| order(line_items).completed_at.strftime("%d/%m/%Y") }
proc { |line_items| order(line_items).completed_at.to_date }
end
def order_cycle
@@ -52,11 +52,11 @@ module Reporting
end
def order_cycle_start_date
proc { |line_items| item_order_cycle(line_items).orders_open_at.strftime("%d/%m/%Y") }
proc { |line_items| item_order_cycle(line_items).orders_open_at.to_date }
end
def order_cycle_end_date
proc { |line_items| item_order_cycle(line_items).orders_close_at.strftime("%d/%m/%Y") }
proc { |line_items| item_order_cycle(line_items).orders_close_at.to_date }
end
def product