typescript create date with given year code example Example: types date typescript const date: Date = new Date();