How to compare client date and server date in javascript
===

I am new to JavaScript. I have a code running code to select at date from calender, but I want to set current date from server date in calender and checks client date and server date.
I goggled for it but nothing is useful. I am really stuck here.
Please provide me an example or reference if possible.
Thanks in advance.