forked from assembler-institute/php-basics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdates.php
More file actions
45 lines (22 loc) · 699 Bytes
/
dates.php
File metadata and controls
45 lines (22 loc) · 699 Bytes
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
<?php
#Date time argument "Y-m-d"
echo "Date with argument 'Y-m-d': <br><br>";
echo "Today is " . date("Y-m-d");
echo "<br><br><br>";
#Date time argument "Y-m-d"
echo "Date with any format 'Y/m/d/l': <br><br>";
echo "Today is " . date("Y/m/d/l");
echo "<br><br><br>";
#Get Current Day
echo "Current day 'l': <br><br>";
echo "Today is " . date("l");
echo "<br><br><br>";
#Get Current Month in numerical Format
echo "Current Month in numerical Format 'm': <br><br>";
echo "Today is " . date("m");
echo "<br><br><br>";
#Get current minutes with Leading zeros
echo "Current Minutes with leading zeros 'i': <br><br>";
echo "Current minute: " . date("i");
echo "<br><br><br>";
?>