test Date function