get todays date in typescript

To get today's date in TypeScript, you can create a new Date object without any arguments. This will return the current date and time in the local timezone.

Here's an example:

index.ts
const today: Date = new Date();
32 chars
2 lines

You can then use this Date object to display or manipulate the date as needed.

gistlibby LogSnag