Date utilities for JavaScript