Created
June 19, 2019 10:36
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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