Closed odesey closed 9 years ago
What URL and parameters are you calling?
When I call the api at http://api.randomuser.me/?results=200, the birthdays are all randomized as designed.
I ran the following:
var randomUser = HTTP.get("http://api.randomuser.me/?results=200&nat=us", {params:{dataType: 'json'}}, function(error, result){ console.log(error); console.log(result); randomUser = result; })
Then:
moment(randomUser.data.results[99].user.dob).format("MM-DD")
And all the user months come back in Jan.
You will need to use the unix
method on the timestamp in order for Moment.js to work with it.
Try this out
moment.unix(randomUser.data.results[99].user.dob).format("MM-DD")
Check this out for more info: http://momentjs.com/docs/#/parsing/unix-timestamp/
Worked! Thanks for the help.
No problem! :)
I requested 200 random users and all the user birth days are in January 1970. Is this a bug or by design?