0

I have the display today days using gate but no idea about to start in TypeScript

2 Answers2

0

As the comment pointed out, TypeScript is also JavaScript. So you can:

const now = new Date();
day = now.getDay();
// Sunday - Saturday : 0 - 6

See more: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date

Libo
  • 1
0

Get current weekday. just like @libo but inline

new Date().getDay();
dipenparmar12
  • 3,042
  • 1
  • 29
  • 39