Make is_between more javascripty