a custom wrapper for JavaScript date object