Today is 2025/06/08
Today is 2025.06.08
Today is 2025-06-08
Today is Sunday
The time is 04:15:26am
The time is 04:15:26am
© 2010-2025

Go to Next Page

1. Date() fucntion • The required format parameter of the date() function specifies how to format the date (or time). • Here are some characters that are commonly used for dates: • d - Represents the day of the month (01 to 31) • m - Represents a month (01 to 12) • Y - Represents a year (in four digits) • l (lowercase 'L') - Represents the day of the week • Other characters, like"/", ".", or "-" can also be inserted between the characters to add additional formatting. 2. Get a Simple Time • Here are some characters that are commonly used for times: • h - 12-hour format of an hour with leading zeros (01 to 12) • i - Minutes with leading zeros (00 to 59) • s - Seconds with leading zeros (00 to 59) • a - Lowercase Ante meridiem and Post meridiem (am or pm) 3. Get Your Time Zone • If the time you got back from the code is not the right time, it's probably because your server is in another country or set up for a different timezone. To set a proper time zone, date_default_timezone_set("America/New_York"); 4 . Automatic Copyright Year • Use the date() function to automatically update the copyright year on your website: • Example • © 2010-2025