Move date logic into the data class