Hi, quick question, is there any way to get the server date using the Javascript SDK?
Thanks,
Daniel
3 Answers, 1 is accepted
0
Anton Dobrev
Telerik team
answered on 19 Jan 2015, 05:06 PM
Hi Daniel,
There is no such utility method integrated in the SDK. You can register a Cloud Function that returns new Date to observe the server time. For instance:
The use for the method in my web project is to calculate the difference in months between a given start date which is user defined and the current date, this then allows me to trigger certain events for a bit of gamification.
Thanks again,
Daniel
0
Anton Dobrev
Telerik team
answered on 22 Jan 2015, 08:47 AM
Hi,
Thanks for specifying this.
You might also register another cloud function that handles the calculation itself when called if you do not need to make this client-side.
Please, let me know if you have further questions.
Regards,
Anton Dobrev
Telerik
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.