-
Notifications
You must be signed in to change notification settings - Fork 0
/
time_page.html
72 lines (70 loc) · 2.66 KB
/
time_page.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" href="css/bootstrap.min.css" >
<style>
* {
margin: 0;
padding: 0;
}
body {
width: 360px;
}
div {
text-align: center;
margin: 10px;
}
.btn, .form-control {
font-size: 12px;
}
#zy_time_area {
margin-bottom: 15px;
}
#zy_time_area input {
width: 280px;
margin: auto;
}
</style>
</head>
<body>
<div id="zy_time_area">
<h5><img src="images/icon38.png" style="width: 24px; height: 24px; margin-right: 5px; margin-bottom: 5px;" />时间日期工具</h5>
<div>
<button id="zy_current_time_btn" class="btn btn-primary btn-sm">当前的时间</button>
<button id="zy_selection_time_btn" class="btn btn-primary btn-sm">选中的时间</button>
<button id="zy_clear_time_btn" class="btn btn-primary btn-sm">清空时间</button>
</div>
<div>
<input id="zy_ts_input" type="text" class="form-control form-control-sm" placeholder="请输入长整型时间戳" />
</div>
<div>
<button id="zy_ts_to_dt_btn" class="btn btn-primary btn-sm">↓ 转日期 ↓</button>
<button id="zy_dt_to_ts_btn" class="btn btn-primary btn-sm">↑ 转时间戳 ↑</button>
</div>
<div>
<input id="zy_dt_input" type="text" class="form-control form-control-sm" placeholder="请输入yyyy-MM-dd HH:mm:ss格式时间" />
</div>
<div>
<button id="zy_truncate_time_btn" class="btn btn-primary btn-sm">向下取整</button>
<button id="zy_minus_time_btn" class="btn btn-primary btn-sm" style="font-size:15px; line-height:70%;height: 28px; width: 28px;">-</button>
<input id="zy_time_delta_input" type="number" class="form-control form-control-sm" style="display: inline-block; width: 55px;" value="1"/>
<select id="zy_time_unit_select" class="form-control form-control-sm" style="display: inline-block; width: 55px;">
<option value="second">秒</option>
<option value="minute">分</option>
<option value="hour">时</option>
<option value="day" selected>天</option>
<option value="week">周</option>
<option value="month">月</option>
<option value="year">年</option>
</select>
<button id="zy_plus_time_btn" class="btn btn-primary btn-sm" style="font-size:15px; line-height:70%;height: 28px; width: 28px;" >+</button>
<button id="zy_ceiling_time_btn" class="btn btn-primary btn-sm">向上取整</button>
</div>
</div>
<script src="js/moment.min.js"></script>
<script src="js/time_page.js"></script>
</body>
</html>