You can find information on day count fraction calculations and other conventions in the documentation at
http://jfin.org/. jFin also provides full implementations of 10 different day count conventions in Java, it's open source so all of the code is there.