typescript get date code example Example 1: typescript current date/time let dateTime = new Date() Example 2: get today's date javascript var today = new Date();