函数封装: /** * 获取当前时间 * 格式YYYY-MM-DD */ Vue.prototype.getNowFormatDate = function() { var date = new Date(); var seperator1 = "-"; var year = date.getFullYear(); var month = date.getMonth() + 1; var strDate = date.getDate(); if (month >= 1 &
<el-table-column prop="startTime" label="日期" width="200" align="center" :formatter="formatStartTime" /> formatStartTime(row, column) { const value = row.createTime var year = value.substr(0, 4) var m
一:DateTime.ToString格式化日期 二:代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace TmrFormat { public partial
工作当中,总是遇到很多觉得不错的JS脚本.现在觉得还是找个地方记录下来,以后可以随时查看. /** *获取当前时间日期并格式化 */ function getNowDate(){ var mydate=new Date(); var myweekday=mydate.getDay(); var mymonth=mydate.getMonth()+1; var myday= mydate.getDate(); var year= mydate.getFullYear(); if(myweekday
获取当前时间 func Now func Now() Time 1 Now returns the current local time. func (Time) UTC func (t Time) UTC() Time 1 UTC returns t with the location set to UTC. func (Time) Unix func (t Time) Unix() int64 1 Unix returns t as a Unix time, the number of se