date fix and pattern sample