Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (({startTime,records,recordsTarget,timeNowOverride})=>{/*const timeShift=-11*60*60*1000;*/const nnow=!timeNowOverride?new Date:new Date(timeNowOverride);const start = new Date(startTime);const ratio = records/recordsTarget;const duration = nnow.valueOf()-start.valueOf();return new Date( start.valueOf() + duration*(1/ratio)).toLocaleString("en-US", {timeZone: "America/Los_Angeles",hour12:true});})({
- startTime:'2/14/2020 5:48 PM PST',
- recordsTarget:2000,
- records:600
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement