Join Kevin Skoglund for an in-depth discussion in this video Is this a leap year?, part of Easy PHP Projects: Single-Serving Sites.
- In this movie, we'll build on what we've already learned…about working with dates in PHP…to create a single-serving site…that will answer the question, is this a leap year?…You already have the PHP skills to do this.…But you might not know how leap years work,…at least not in detail.…A leap year is a year that adds one additional day…to the month of February.…Normally February has 28 days,…but during a leap year it has 29.…How do we calculate which years have 29?…Every year whose number…is evenly divisible by four,…that year becomes a leap year, and it gets an extra day.…
This is because there are not exactly 365 days in a year.…It takes earth close to 365 days and six hours,…or one-quarter of a day to travel around the sun.…So adding one extra day in February every four years…keeps us on track.…But, there's a big exception to that,…which is that that's true except for years…which are divisible by 100,…but not divisible by 400.…And this is because it is close to 365 days and six hours,…but it's slightly less than that.…
- Finding and validating an IP address with PHP
- Parsing the HTTP request for browser details
- Comparing dates and times in PHP
- Randomizing data with PHP
- Styling page content dynamically
- Generating random sentences
Skill Level Beginner
1. What is My IP Address?
2. Browser Mirror
3. Is it New Years Yet?
4. Random Data and Styling
5. Random Phrase Generator
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.