luxon
Version:
Immutable date wrapper
120 lines (111 loc) • 5.34 kB
HTML
<html>
<head>
<title>Luxon</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/tomorrow.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<style>
.section {
margin-bottom: 40px;
}
</style>
</head>
<body>
<div class="container">
<h1 class="display-1">Luxon</h1>
<p class="lead">A powerful and friendly wrapper for Javascript dates and times.</p>
<pre>
<code>
DateTime.local().setZone('America/New_York').minus({ weeks: 1 }).endOf('day').toISO();
</code>
</pre>
<div class="section">
<h2>Features</h2>
<ul>
<li><a href="docs/class/src/datetime.js~DateTime.html">DateTime</a>, <a href="docs/class/src/duration.js~Duration.html">Duration</a>, and <a href="docs/class/src/interval.js~Interval.html">Interval</a> types.</li>
<li>Immutable, chainable, unambiguous API.</li>
<li>Parsing and formatting for common and custom formats.</li>
<li>Native time zone and Intl support (no locale or tz files).</li>
<li>No dependencies.</li>
</ul>
</div>
<div class="section">
<h2>Documentation</h2>
<p><a href="docs/index.html">Read the docs.</a></p>
</div>
<div class="section">
<h2>Download</h2>
<table class="table">
<tbody>
<tr>
<td>
<b>Browser global</b>
</td>
<td>
<a href="global/luxon.js">Debug</a>
</td>
<td>
<a href="global/luxon.min.js">Minified</a>
</td>
<td>
<p>Exports a global variable called "luxon". Use it like this</p>
<pre><code><script src="luxon.js"></script><br/><script>luxon.DateTime.local();</script></code></pre>
</td>
<td><a href="demo/global.html">Demo</a></td>
</tr>
<tr>
<td>
<b>Node</b>
</td>
<td colspan=2>
<pre><code>npm install luxon</code></pre>
</td>
<td>
<p>Luxon as a Node.js module</p>
<pre><code>var luxon = require('luxon');<br/>luxon.DateTime.local();</code></pre>
</td>
<td/>
</tr>
<tr>
<td>
<b>AMD</b>
</td>
<td>
<a href="amd/luxon.js">Debug</a>
</td>
<td>
<a href="amd/luxon.min.js">Minified</a>
</td>
<td>
<p>Luxon as an AMD module. Use with Require.js, System.js, and so on.</p>
<pre><code>requirejs(['luxon'], function(luxon) {<br/> luxon.DateTime.local();<br/>});</code></pre>
</td>
<td><a href="demo/requirejs.html">Demo</a></td>
</tr>
<tr>
<td>
<b>ES6</b>
</td>
<td>
<a href="es6/luxon.js">Debug</a>
</td>
<td>
<a href="es6/luxon.min.js">Minified</a>
</td>
<td>
<p>Luxon as an ES6 module.</p>
<pre><code>import { DateTime } from 'luxon';<br/>DateTime.local();</code></pre>
</td>
<td/>
</tr>
</tbody>
</table>
</div>
<div class="section">
<h2>Contribute</h2>
<p>Luxon is distributed under the MIT license. The code is available on <a href="https://github.com/icambron/luxon">Github.</a> Patches welcome.</p>
</div>
</div>
</body>
</html>