altered date function for CB plugin