ynnadkrap / balldontlie

NBA API
http://www.balldontlie.io
225 stars 19 forks source link

[REQUEST] add "timestamp" parameter instead of "7:30 PM ET" #100

Open CyrilNb opened 1 year ago

CyrilNb commented 1 year ago

Hello,

I live in Europe and it would be more convenient to have timestamp parameter in addition to "7:30 PM ET" as it's hard to convert into any other timezone.

Thanks a lot!

treyg commented 1 year ago

If you're using JS, you could just use a library like day.js to convert to whatever format you need. I've used it a decent amount if you have any questions. Moment JS is also good, but I think it may be deprecated

https://day.js.org/

CyrilNb commented 1 year ago

No I am not using JS. And it's still better to have a universal format like a timestamp

Ptujec commented 1 year ago

+1 I think it would be the best to include the correct time in the date parameter.

CyrilNb commented 1 year ago

@ynnadkrap would it be possible? Thank you so much. I'm struggling with the date and time format the API is sending

aberaldo commented 1 year ago

Yes the best is a timestamp including the our. And include in the date attribute. Because in status then we dont know at which our was the date when the game ends. Eg

image

When the status is "Final" we lost the our of previous games