compatibility fallback for Date object