O'Reilly logo

PHP in Action: Objects, Design, Agility by Chris Shiflett, Marcus Baker, Dagfinn Reiersol

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Design how-to: date and time handling

8.1 Why object-oriented date and time handling? 153
8.2 Finding the right abstractions 155
8.3 Advanced object construction 158
8.4 Large-scale structure 163
8.5 Using value objects 173
8.6 Implementing the basic classes 176
8.7 Summary 186

Applying object-oriented principles and patterns tends to be more art than science, more improvisation than ritual, more understanding than precise skill. At worst, it’s like movie weddings. Real weddings are notoriously predictable and strictly organized. But in movie weddings, shock and awe is the rule: someone makes a blunder like saying “your awful wedded wife,” the bride or the groom runs away, the wedding guests start fighting, or worse.

We want to avoid ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required