I'm using the khanacademy.org API scratchpads to get the JSON data for users. I am trying to calculate how long they have been a member of khan academy using the date joined and the current date.
This is what they date in JSON looks like: "dateJoined": "2018-04-24T00:07:58Z",
So if data
is a variable that is that JSON path, I could say var memberSince = data.dateJoined;
Is there a way I can calculate the number of years the user has been a member? In psuedo code, this is what the difference would look like: var memberTime = data.dateJoined - current datet
Thanks a lot in advance!