mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
Fix date format validation error (#1551)
* Fix date format validation error * Order trades, fix flaky test
This commit is contained in:
parent
54e46c1b4e
commit
bb9fa56add
3 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ module ApplicationHelper
|
||||||
def date_format_options
|
def date_format_options
|
||||||
[
|
[
|
||||||
[ "DD-MM-YYYY", "%d-%m-%Y" ],
|
[ "DD-MM-YYYY", "%d-%m-%Y" ],
|
||||||
[ "DD.MM.YY", "%d.%m.%Y" ],
|
[ "DD.MM.YYYY", "%d.%m.%Y" ],
|
||||||
[ "MM-DD-YYYY", "%m-%d-%Y" ],
|
[ "MM-DD-YYYY", "%m-%d-%Y" ],
|
||||||
[ "YYYY-MM-DD", "%Y-%m-%d" ],
|
[ "YYYY-MM-DD", "%Y-%m-%d" ],
|
||||||
[ "DD/MM/YYYY", "%d/%m/%Y" ],
|
[ "DD/MM/YYYY", "%d/%m/%Y" ],
|
||||||
|
|
|
@ -98,7 +98,7 @@ class Account::HoldingCalculator
|
||||||
end
|
end
|
||||||
|
|
||||||
def trades
|
def trades
|
||||||
@trades ||= account.entries.includes(entryable: :security).account_trades.to_a
|
@trades ||= account.entries.includes(entryable: :security).account_trades.chronological.to_a
|
||||||
end
|
end
|
||||||
|
|
||||||
def portfolio_start_date
|
def portfolio_start_date
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class Family < ApplicationRecord
|
class Family < ApplicationRecord
|
||||||
include Plaidable, Syncable
|
include Plaidable, Syncable
|
||||||
|
|
||||||
DATE_FORMATS = [ "%m-%d-%Y", "%d-%m-%Y", "%Y-%m-%d", "%d/%m/%Y", "%Y/%m/%d", "%m/%d/%Y", "%e/%m/%Y", "%Y.%m.%d" ]
|
DATE_FORMATS = [ "%m-%d-%Y", "%d.%m.%Y", "%d-%m-%Y", "%Y-%m-%d", "%d/%m/%Y", "%Y/%m/%d", "%m/%d/%Y", "%e/%m/%Y", "%Y.%m.%d" ]
|
||||||
|
|
||||||
include Providable
|
include Providable
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue