September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
11
Task/Text-processing-2/Jq/text-processing-2-5.jq
Normal file
11
Task/Text-processing-2/Jq/text-processing-2-5.jq
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# The following ignores any issues with respect to duplicate dates,
|
||||
# but does check the validity of the record, including the date format:
|
||||
def number_of_valid_readings:
|
||||
def check:
|
||||
. as $in
|
||||
| (.[0] | is_date)
|
||||
and length == 49
|
||||
and all(range(0; 24) | $in[2*. + 1] | is_float)
|
||||
and all(range(0; 24) | $in[2*. + 2] | (is_integral and tonumber >= 1) );
|
||||
|
||||
map(select(check)) | length ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue