added asDate for casting dateString to date object