the calculation about NSdate