Skip to content

Instantly share code, notes, and snippets.

@PietrH
Created June 19, 2019 10:36
Show Gist options
  • Save PietrH/4b4e8d636b96311cbfe9dca326e10bf3 to your computer and use it in GitHub Desktop.
Save PietrH/4b4e8d636b96311cbfe9dca326e10bf3 to your computer and use it in GitHub Desktop.
Check if a date doesn't start with a number of day values in Openrefine GREL (General Refine Expression Language)
#parse the date as a string and extract the day,
#compare it to the string value '1' and '15' and if it's equal to either, respond TRUE else respond FALSE
or((value.toDate('dd MMM yyyy').toString('d'))==toString(1),(value.toDate('dd MMM yyyy').toString('d'))==toString(15))
#to be used as a Facet in OpenRefine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment