year

2018-09-26 admin

year是什么

什么是year,Simple utility to get the current year with 2 or 4 digits.

year使用教程帮助文档

year NPM version

Simple utility to get the current year with 2 or 4 digits.

Install with npm

npm i year --save

Usage

var year = require('year');

console.log(year());
//=> 2014
console.log(year('yyyy'));
//=> 2014
console.log(year('yy'));
//=> 14

Author

Jon Schlinkert

License

Copyright © 2014 Jon Schlinkert Released under the MIT license


This file was generated by verb on December 01, 2014.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-41259.html

文章标题:year

相关文章
update-year
update-year是什么 什么是update-year,Update or add the current year to a range of years in a string. update-year官网:官网 update-y...
2018-09-25
Javascript, Time and Date: Getting the current minute, hour, day, week, month, year of a given millisecond time
Hamster提出了一个问题:Javascript, Time and Date: Getting the current minute, hour, day, week, month, year of a given millisecon...
2018-04-13
JavaScript日期。getyear()返回111,2011?[重复]
JK.提出了一个问题:Javascript date.getYear() returns 111 in 2011? [duplicate],或许与您遇到的问题类似。 回答者deceze给出了该问题的处理方式: https://develop...
2018-03-10
为什么JavaScript getyear()返回108?
ctrlShiftBryan提出了一个问题:Why does Javascript getYear() return 108?,或许与您遇到的问题类似。 回答者ConroyP给出了该问题的处理方式: It’s a Y2K thing, on...
2018-03-19
JavaScript setFullYear() 方法
<p><a href=“jsref-obj-date.html”><img class=“navup” src="/public/upload/imgs/up.gif" alt=“Date ...
2019-03-02
JavaScript setUTCFullYear() 方法
<p><a href=“jsref-obj-date.html”><img class=“navup” src="/public/upload/imgs/up.gif" alt=“Date ...
2019-03-02
A year with Spectre: a V8 perspective
Published 23 April 2019 · tagged with security On January 3, 2018, Google Project Zero and others disclosed the first th...
2019-04-24
JavaScript getFullYear() 方法
<p><a href=“jsref-obj-date.html”><img class=“navup” src="/public/upload/imgs/up.gif" alt=“Date ...
2019-03-02
JavaScript getUTCFullYear() 方法
<p><a href=“jsref-obj-date.html”><img class=“navup” src="/public/upload/imgs/up.gif" alt=“Date ...
2019-03-02
回到顶部