Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

TimezoneDetect

Detect the standard time, the daylight saving time for the time zone

Build Status

if (timezonedetect.hasDaylightSavingTime()) {
  console.log('You have daylight saving time in your timezone');
} else {
  console.log('You DO NOT have daylight saving time in your timezone');
}

console.log('Your standard time zone offset in second is ' + jsk.tz.standardTime());
console.log('Your standard time zone offset is : ' + jsk.tz.standardTimeToString());

See the complete documentation in timezonedetect.js

Testimonial

Finally, timezones in javascript done right. The world has been made a better place via this fine javascript library.

Garry Tan, Partner with Y Combinator. Cofounder of Posterous. (source)

Install

To install for a website, copy timezonedetect.min.js with the other javascript files of your project and include it.

To install in a Node.js project npm install timezonedetect

Contribute

Give what you want to contribute to open-source :

Donate

You can create issues.

You can also contribute code :

  1. Fork the code on GitHub
  2. Clone your fork in your environment : git clone git@github.com:USERNAME/timezonedetect.git
  3. Create a branch for your feature : git checkout -b your_branch_name
  4. Write and delete code and commit as often as you can : git commit -am "A descriptive message"
  5. Push the branch to your fork : git push origin your_branch_name
  6. Create a pull request on GitHub (click the Pull request button on your fork page)

Need more help?

About

Detect the standard time, the daylight saving time for the current time zone

Resources

License

Packages

No packages published