当前位置:主页 > 资料 >

Luxon, an immutable date wrapper similar to Moment
栏目分类:资料   发布日期:2017-10-31   浏览次数:

导读:本文为去找网小编(www.7zhao.net)为您推荐的Luxon, an immutable date wrapper similar to Moment,希望对您有所帮助,谢谢! Luxon A powerful and friendly wrapper for Javascript dates and times. DateTime.local().setZone('

本文为去找网小编(www.7zhao.net)为您推荐的Luxon, an immutable date wrapper similar to Moment,希望对您有所帮助,谢谢! 欢迎访问www.7zhao.net



Luxon

A powerful and friendly wrapper for Javascript dates and times. www.7zhao.net

DateTime.local().setZone('America/New_York').minus({ weeks: 1 }).endOf('day').toISO(); copyright www.7zhao.net 

Features

  • ,Duration, andInterval types.
  • Immutable, chainable, unambiguous API.
  • Parsing and formatting for common and custom formats.
  • Native time zone and Intl support (no locale or tz files).

Documentation

欢迎访问www.7zhao.net

Download

Browser global

Exports a global variable called "luxon". Use it like this

copyright www.7zhao.net

<script src="luxon.js"></script>
<script>luxon.DateTime.local();</script> 内容来自www.7zhao.net 
Node
npm install luxon www.7zhao.net 

Luxon as a Node.js module copyright www.7zhao.net

var luxon = require('luxon');
luxon.DateTime.local(); 

欢迎访问www.7zhao.net

AMD

Luxon as an AMD module. Use with Require.js, System.js, and so on. 去找(www.7zhao.net欢迎您

requirejs(['luxon'], function(luxon) {
  luxon.DateTime.local();
}); 

去找(www.7zhao.net欢迎您

ES6

Luxon as an ES6 module. www.7zhao.net

import { DateTime } from 'luxon';
DateTime.local(); 内容来自www.7zhao.net 

Contribute

Luxon is distributed under the MIT license. The code is available on Patches welcome.

内容来自www.7zhao.net

copyright www.7zhao.net


本文原文地址:https://moment.github.io/luxon/

以上为Luxon, an immutable date wrapper similar to Moment文章的全部内容,若您也有好的文章,欢迎与我们分享! 去找(www.7zhao.net欢迎您

Copyright ©2008-2017去找网版权所有   皖ICP备12002049号-2 皖公网安备 34088102000435号   关于我们|联系我们| 免责声明|友情链接|网站地图|手机版