Repository navigation
Expand file tree
/
Copy pathdates.php
More file actions
95 lines (64 loc) · 1.9 KB
/
Copy pathdates.php
File metadata and controls
95 lines (64 loc) · 1.9 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta2/css/all.min.css"
integrity="sha512-YWzhKL2whUzgiheMoBFwW8CKV4qpHQAEuvilg9FAn5VJUDwKZZxkJNuGM4XkWuk94WCrrwslk8yWNGmY1EduTA=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<title>Dates</title>
</head>
<body>
<header class="header">
<a href="http://localhost:3000/operators.php"><i class="fas fa-arrow-left"></i></a>
<div class="bola">
<img src="assets/Profile - Testing.png" width="150" alt="">
<h1>Dates</h1>
<a href="https://www.php.net/manual/en/datetime.formats.php" target="_blank">Docs</a>
</div>
<a href="http://localhost:3000/conditionals.php"><i class="fas fa-arrow-right"></i></a>
</header>
<div class="flex-row margin-top">
<div class="card">
<h5>Date Time</h5>
<?php
$dateTime = new DateTime();
echo $dateTime->format("Y,m,d")
?>
</div>
<div class="card">
<h5>Date Time in Any Format</h5>
<?php
$dateTime = new DateTime();
echo $dateTime->format("l, d-M-Y H:i:s T")
?>
</div>
<div class="card">
<h5>Current Day</h5>
<?php
$dateTime = new DateTime();
echo $dateTime->format("l");
echo "<br>";
echo $dateTime->format("d");
?>
</div>
<div class="card">
<h5>Current Month Numeric</h5>
<?php
$dateTime = new DateTime();
echo $dateTime->format("m")
?>
</div>
<div class="card">
<h5>Current Minutes Leading 00</h5>
<?php
$dateTime = new DateTime();
echo $dateTime->format("i")
?>
</div>
</div>
</div>
</body>
</html>