You can add time manually using getTime(). which gets time in milliseconds.
- 1 minute = 60000 milliseconds
- 60 minutes = 60x60000
- 5 hours = 300x60000
- and so on...
Eg:
curDate=new Date();
futDate=new Date(this.curDate.getTime()+330*60000);
This will add 5 hours 30 minutes to current time.
Top comments (1)
Time conversion in TypeScript..