throw exception if segment is out of range
fix for years
add DoW and Year tests
add travis CI