magic 获取当前月,当前年

简介: magic 获取当前月,当前年
var date = new Date();
var month=date.getMonth()+1;//js 月份是从0开始的
month=month.toString();
if(month.length()==1){
    month="0"+month;
}
var year=date.toGMTString().split(' ');
year=yerar[2];//获取当前年份
相关文章
|
4月前
|
NoSQL Go 容器
Available flags for AddressSanitizer
Available flags for AddressSanitizer
|
存储 C语言
【CSAPP随笔】CH3:Bits, Bytes, and Integers
【CSAPP随笔】CH3:Bits, Bytes, and Integers
85 0
|
数据可视化 Java Shell
JupyterNotebook‘s Magic
JupyterNotebook‘s Magic
87 1
|
JavaScript Java Unix
vue 里怎么通过魔数(magic number)去限制上传文件类型?
vue 里怎么通过魔数(magic number)去限制上传文件类型?
519 0
vue 里怎么通过魔数(magic number)去限制上传文件类型?
no symbol version section for versioned symbol `memcpy@GLIBC_2.4'
no symbol version section for versioned symbol `memcpy@GLIBC_2.4'
158 0
|
编译器
relocation value does not fit in 26 bits (offset: 0x10, type: 1)
relocation value does not fit in 26 bits (offset: 0x10, type: 1)
217 0
|
Java Linux
LINUX编译OPENJDK:The tested number of bits in the target (0) differs from the number of bits expected
LINUX编译OPENJDK:The tested number of bits in the target (0) differs from the number of bits expected
229 0
A2011 Magic Mirror
A2011 Magic Mirror
174 0
A2011 Magic Mirror
#define 以及##
#define 以及##
118 0
|
C语言
define需要注意的点
define需要注意的点
171 0
define需要注意的点