Fix ATSB date handling
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
21e668e21d
commit
b42245747a
11
jq/atsb.jq
11
jq/atsb.jq
|
@ -21,10 +21,13 @@ import "./helpers" as helpers;
|
|||
"link": (.children[0].children[0].href|helpers::urlresolve("https://www.atsb.gov.au")),
|
||||
"guid": (.children[0].children[0].href|helpers::urlresolve("https://www.atsb.gov.au")),
|
||||
"pubDate": (
|
||||
if .children[4].text == "N/A" then .children[2].text else .children[4].text end
|
||||
| strptime("%d %b %Y")
|
||||
| mktime
|
||||
| strftime("%a, %d %b %Y %T %z")
|
||||
if .children[4].text == "N/A" then [.children[2].text] else [.children[4].text] end
|
||||
| strings
|
||||
| map(
|
||||
strptime("%d %b %Y")
|
||||
| mktime
|
||||
| strftime("%a, %d %b %Y %T %z")
|
||||
)
|
||||
)
|
||||
}]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue