Advertisement
Guest User

Estimate time

a guest
Feb 14th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (({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});})({
  2. startTime:'2/14/2020 5:48 PM PST',
  3. recordsTarget:2000,
  4. records:600
  5. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement