使用warp.js的这个脚本从当前日期开始运行良好。我似乎无法弄清楚如何从1986年1月2日之前的日期开始工作?
warp.js https://github.com/mattbradley/warpjs/blob/master/README.md
谢谢!
<body>
<script src="warp.js"></script>
<div id="container"></div>
<span id="info"></span><br>
<span id="time"></span>
<span id="time2"></span>
<script>
setInterval(function() {
//specify a start date here like Jan 2 1986
Date.warp.speed(3);
var now = new Date;
//new date put out the warped start date above?
var dateD = [now.getMonth() + 1, now.getDate(), now.getFullYear()];
var dateE = [now.getHours(), now.getMinutes(), now.getSeconds()];
var MDY = dateD.join("/");
var HMS = dateE.join(":");
time.innerHTML = (MDY);
time2.innerHTML = (HMS);
}, 1000);
</script>
</body>
</html>
答案 0 :(得分:1)
我想出来了。你必须使用clock()函数,所以设置你的自定义日期,然后它将从该自定义日期变形。
Table table = new Table();
Row row = new Row();
Cell cell = new Cell();
using(Streamreader sr = new Streamreader(file))
{
string str;
while((str = sr.ReadLine()) != null)
{
if(str.Includes("Marker"))
{
row = table.AddRow();
cell = row.Cells[0]
cell = row.Cells[1] // actually I use a counter variable, cause my table has 6 cells consistent.
}
}
}