mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
fix: loosen restrictions on date format
This commit is contained in:
parent
289b04bc69
commit
2cb43058a0
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ class SurveyItemValues
|
|||
def recorded_date
|
||||
@recorded_date ||= begin
|
||||
recorded_date = value_from(pattern: /Recorded\s*Date/i)
|
||||
date = if recorded_date.match(%r{\d+/\d+/\d+\s+\d+:\d+:\d+})
|
||||
date = if recorded_date.match(%r{\d+/\d+/\d+})
|
||||
Date.strptime(recorded_date, "%m/%d/%Y")
|
||||
elsif recorded_date.match(/\d+-\d+-\d+(T|\s)\d+:\d+:\d+/)
|
||||
Date.parse(recorded_date)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue