Fixed date processing bug and added documentation