https://github.com/zmofei/sysdate
use javascript get servers date
https://github.com/zmofei/sysdate
Last synced: 11 months ago
JSON representation
use javascript get servers date
- Host: GitHub
- URL: https://github.com/zmofei/sysdate
- Owner: zmofei
- Created: 2013-11-21T02:24:25.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-24T09:07:24.000Z (about 12 years ago)
- Last Synced: 2024-10-15T20:27:05.360Z (over 1 year ago)
- Language: JavaScript
- Size: 201 KB
- Stars: 3
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
sysDate
=======
use javascript get servers date ,which you needn't care about the servers script.
example
=======
you can simple use it like this:
``` javascript
var a=sysDate(option);
//option is an object,like {'url':'/getDate'}
a.done(function(data){
console.log('done',data);
//it will return 'done 1385003673000'
});
```
or you can use it async
``` javascript
var a=sysDate();
//use async it's also awesome : )
//but you must the time you get the time is when you define sysDate().
setTimeout(function(){
a.done(function(data){
console.log('done',data);
//it will return 'done 1385003673000'
});
},3000)
```
thanks
====
thanks PaPa, who didn't give me the server ajax port,which make this project come true.
thanks lay, who give me the async idea.