6 个JavaScript日期处理库
1. Later.js
Later.js, a stadalone JavaScript library, offers an advanced usage for triggering recurring events and can easily replace both methods for many projects. Also, the library accepts cron expressions or user friendly schedules (like “every 10 seconds”). P.S. It works both in the browser and Nodejs.
2. Countdown.js
Countdown.js is a JavaScript library for calculating and displaying the timespan between two dates. The library calculates the value continuously considering “the time goes on” and keeps generating an accurate output. It can provide the time span in many formats like milliseconds, seconds, minutes, hours, days, weeks and even millennias. There are methods for displaying it as an English sentence like “3 years, 6 months, 21 days, 10 hours, and 32 minutes”. The countdown can be reset easily and there are callbacks both on startand end.
3. Moment.js
Moments.js is a feature-rich JavaScript library for working with dates (parsing, manipulating, and formatting them). It works both in the browser and server with NodeJS as all code is compatible with both of the environments. The library can easily convert any given date to many different formats, add/subtract dates, hours, etc. and has methods for displaying user-friendly date/times like “in 5 days” Moment.js is multilanguage and any new languages can be easily added by editing a language file.
4. Date.js
Datejs is an open-source JavaScript Date Library. With simple to use commands, Datejs provides many useful date functions like: last December, next Thursday, +10years, & many date format conversions. Date objects in JavaScript are generally problematic as they may require complicated calculations to run. Datejs is absolutely a life-saver in this area.
5. Cubism.js
Cubism.js is a plugin for D3.js, a JavaScript visualization library for HTML and SVG, to display time series in real-time. It requests the data incrementally by polling only the most recent values and reduces the load on the server. Charts are rendered incrementally as well by shifting charts one pixel each time to the left. Cubism is data-source agnostic. It has built-in support for Graphite and Cube, and can be readily extended to fetch data from other sources.
6. Xdate.js
XDate is another library similar to String.js but for parsing, formatting and manipulating dates. The library is standalone, only 2.9kb gzipped, has chaining support and brings very handy methods like: getting date values, adding-subtracting dates, calculating differences, and getting outputs in multiple formats. It also has a wide set of methods for working with UTC values.
6 个JavaScript日期处理库的更多相关文章
- 2016 年 50 个最佳的轻量级 JavaScript 框架和库
作者:IT程序狮链接:https://zhuanlan.zhihu.com/p/24598210来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 回顾今年已发布的 JS ...
- 2016年31款轻量高效的开源JavaScript插件和库
目前有很多网站设计师和开发者喜欢使用由JavaScript开发的插件和库,但同时面临一个苦恼的问题:它们中的大多数实在是太累赘而且常常降低网站的性能.其实,其中也有不少轻量级的插件和库,它们不仅轻巧有 ...
- Win10系列:JavaScript 的 WinJS库
WinJS 库是由 CSS 和 JavaScript 文件组成的.使用Visual Studio 2012新建一个JavaScript 的Windows应用商店的空白应用程序项目,在项目的引用管理器中 ...
- js非常强大的日历控件fullcalendar.js, 日期时间库: moment.js
日历控件: https://fullcalendar.io/docs/ https://fullcalendar.io/docs/event_data/events_function/ https:/ ...
- jQuery 是javascript的一个库(常用插件、处理器)
jQuery校验官网地址:http://bassistance.de/jquery-plugins/jquery-plugin-validation jQuery就是javascript的一个库,把我 ...
- 轻量高效的开源JavaScript插件和库 【转】
图片 布局 轮播图 弹出层 音频视频 编辑器 字符串 表单 存储 动画 时间 其它 加载器 构建工具 测试 包管理器 CDN 图片 baguetteBox.js - 是一个简单易用的响应式图像灯箱效果 ...
- 2016年31款轻量高效的开源 JavaScript 插件和库
目前有很多网站设计师和开发者喜欢使用由JavaScript开发的插件和库,但同时面临一个苦恼的问题:它们中的大多数实在是太累赘而且常常降低网站的性能.其实,其中也有不少轻量级的插件和库,它们不仅轻巧有 ...
- 2017最好的JavaScript框架、库和工具 — SitePoint
与开发者数量相比,可能有更多的JavaScript框架.库和工具.截止到2017年5月,在GitHub上快速搜索能搜到超过110万的JavaScript项目. 在npmjs上有50万的可用包,并且这些 ...
- 2016 年 31 款轻量高效的开源 JavaScript 插件和库
目前有很多网站设计师和开发者喜欢使用由JavaScript开发的插件和库,但同时面临一个苦恼的问题:它们中的大多数实在是太累赘而且常常降低网站的性能.其实,其中也有不少轻量级的插件和库,它们不仅轻巧有 ...
随机推荐
- Linux磁盘分区与格式化
磁盘分区格式说明 linux分区不同于windows linux下分区标示: 例如:hda1 hd这两个字母表示分区所在的设备类型,hd标示IDE类型硬盘,sd表示SCSI类型硬盘 第三字母a标示硬盘 ...
- HDU3996 Gold Mine(最大权闭合子图)
#include<cstdio> #include<cstring> #include<queue> #include<algorithm> using ...
- cocos2d ccmenulabel
// // TestMenu.hpp // mario // // Created by sun on 15/12/22. // // #ifndef TestMenu_hpp #define Tes ...
- TYVJ P1063 数字串 Label:双指针 线性扫描
描述 给你一个长度为n的数字串,数字串里会包含1-m这些数字.如果连续的一段数字子串包含了1-m这些数字,则称这个数字字串为NUM串.你的任务是求出长度最短的NUM串是什么,只需要输出这个长度即可.1 ...
- PHP文件漏桐可以通过对服务器进行设置和配置来达到防范目的
对脚本执行漏洞的防范 黑客利用脚本执行漏洞进行攻击的手段是多种多样的,而且是灵活多变的,对此,必须要采用多种防范方法综合的手段,才能有效防止黑客对脚本执行漏洞进行攻击.这里常用的方法方法有以下四种.一 ...
- IIS权限设置
Check in the IIS Manager to see what authentication type is enabled on the directories that are part ...
- 【液晶模块系列基础视频】4.4.X-GUI图形界面库-画tab函数简介
[液晶模块系列基础视频]4.4.X-GUI图形界面库-画tab函数简介 ============================== 技术论坛:http://www.eeschool.org 博客地址 ...
- 【液晶模块系列基础视频】4.1.X-GUI图形界面库-画线画圆等函数简介
[液晶模块系列基础视频]4.1.X-GUI图形界面库-画线画圆等函数简介 ============================== 技术论坛:http://www.eeschool.org 博客地 ...
- Frenetic HelloSDNWorld
Follow Frenetic-Github HelloSDNWorld 实验环境: Frenetic虚拟机: 实验步骤: 1.Start up a terminal window - – two a ...
- Sublime Text3 中文汉化
首先安装Package Control,如果已经安装过可以跳过此步骤.可以按照官网这里https://packagecontrol.io/installation 复制命令或者直接复制下面: impo ...