首页
斐讯设备
疯言疯语
系统运维
编程语言
网站建设
友情连接
推荐
autojs
Search
1
charles破解注册码(含windows和mac)最新安装教程「亲测有效」
57 阅读
2
aris常用命令收集
32 阅读
3
【N1和Armbian】一、N1刷Linux系统armbian
31 阅读
4
docker更新现有容器为自动重启
28 阅读
5
[上]JAVA学习系列模块九第五章186.对象数组_基本使用
26 阅读
登录
Search
标签搜索
JAVA
JAVA学习系列
docker
Linux
js
N1
git
模块二
模块一
端口
模块五
数据库
模块九
模块四
镜像
模块三
模块六
MySQL
百度网盘
nginx
DaiMaFengZi
累计撰写
591
篇文章
累计收到
10
条评论
首页
栏目
斐讯设备
疯言疯语
系统运维
编程语言
网站建设
页面
友情连接
推荐
autojs
搜索到
27
篇与
的结果
2022-04-22
js/nodejs getMinutes获取当前时间,小于10前边补0
js/nodejs getMinutes获取当前时间,小于10前边补0var time = function(){ var date=new Date(); //年 var year=date.getFullYear(); //月 var month=(date.getMonth()+1)<10?"0"+(date.getMonth()+1):(date.getMonth()+1); //日 var day=date.getDate()<10?"0"+date.getDate():date.getDate(); //时 var hh=date.getHours()<10?"0"+date.getHours():date.getHours(); //分 var mm=date.getMinutes()<10?"0"+date.getMinutes():date.getMinutes(); //秒 var ss=date.getSeconds()<10?"0"+date.getSeconds():date.getSeconds(); var nowTime = year+"-"+month+"-"+day+" "+hh+":"+mm+":"+ss; return nowTime; } console.log("当前时间是"+time())
2022年04月22日
1 阅读
0 评论
0 点赞
2022-04-22
js实现new Date(),nodejs通用时间对象和时间戳操作
js中实现时间date对象var myDate = new Date();//获取系统当前时间,结果:Wed Aug 09 2017 00:00:00 GMT+0800 (中国标准时间)获取new Date对象的具体时间戳var date_in = date1.getTime();//date_in结果:1501862400000获取特定格式的时间myDate.getYear(); //获取当前年份(2位) myDate.getFullYear(); //获取完整的年份(4位,1970-????) myDate.getMonth(); //获取当前月份(0-11,0代表1月) myDate.getDate(); //获取当前日(1-31) myDate.getDay(); //获取当前星期X(0-6,0代表星期天) myDate.getTime(); //获取当前时间(从1970.1.1开始的毫秒数) myDate.getHours(); //获取当前小时数(0-23) myDate.getMinutes(); //获取当前分钟数(0-59) myDate.getSeconds(); //获取当前秒数(0-59) myDate.getMilliseconds(); //获取当前毫秒数(0-999) myDate.toLocaleDateString(); //获取当前日期 var mytime=myDate.toLocaleTimeString(); //获取当前时间 myDate.toLocaleString( ); //获取日期与时间获取date1==2017-08-31var date1 = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate(); var date3 = Date.parse(new Date(Date.parse((new Date().getFullYear() + "/" + (new Date().getMonth() + 1) + "/" + new Date().getDate()))))+86400000 var date2 = new Date(date3).getFullYear() + "-" + (new Date(date3).getMonth() + 1) + "-" + new Date(date3).getDate(),
2022年04月22日
1 阅读
0 评论
0 点赞
2022-03-06
nodejs的npm修改源
在国内用npm install时,速度总是不尽如人意,解决办法是修改npm的数据源npm config set registry https://registry.npm.taobao.org修改后可以通过这个进行测试npm config get registry如果更改好了之后提示错误。Nothing to stop. No server is running for the store at /root/.pnpm-store/v3 ERROR This modules directory was created using the following registries configuration: {"default":"https://registry.npm.taobao.org/"}. The current configuration is {"default":"https://registry.npmjs.org/"}. To recreate the modules directory using the new settings, run "pnpm install"解决办法:运行pnpm install -g
2022年03月06日
0 阅读
0 评论
0 点赞
1
...
3
4