This course is a look at how to handle dates in Twig and Craft, including date formatting, DateTime objects, date comparisons, and modifying dates.
I am the creator of CraftQuest, a web developer, and former software team manager. I spend most of my time improving CraftQuest with code and courses. When I'm not in front of the computer, I spend my time with my family, and running on the roads and trails of Austin, TX.
Dates in Twig and Craft is made up of the following videos:
|1||Introduction to the Course||An introduction to what we'll cover and a brief primer on dates in Twig and Craft.||05:52|
|2||date() Function||The date() function in Twig converts a string date to a DateTime object.||08:09|
|3||Date Filters||What do we do in Twig when we have DateTime object and need to convert it to a string? We use the date filter.||10:12|
|4||Comparing Dates||Following up on a livestream I did while building the Recently Added module, I step back and look at date comparisons.||17:48|
|5||Modifying Dates in Twig||We revisit some CraftQuest template code and use the date_modify filter to alter a date.||04:53|
|6||Relative Dates in Twig and Craft||How to smartly display a relative date in Twig and Craft.||13:19|
Andrew demonstrates how he uses an extended template to set global variables right in Twig. No PHP required!
Ryan and Andrew answer questions about where to start with front-end tooling, what makes a good Craft CMS hosting provider, and how to create a Twig global variable in Twig.
Andrew and Ryan answer your questions and show how the embed tag in Twig works.
How to create custom Twig filters and functions in Craft CMS.
Follow along with Sprig developer Ben Croker and build a multi-step reactive form with Craft CMS and Sprig.
Create reusable templates that can render content from any section of a site.
In this course we’re going to build a component library using Fractal for the Crafty Coffee website using Fractal.