Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- @outputSchema("is_contained:int")
- def is_contained_within(val, begin_range, end_range):
- # If there is no list of dates, the passed
- # date will not be in between them
- if not begin_range:
- return 0;
- if (not end_range) and (val >= begin_range):
- return 1;
- if (val >= begin_range) and (val <= end_range):
- return 1
- return 0
Add Comment
Please, Sign In to add comment