There’s a popular internet meme that says a July will only ever have five complete weekends, a Friday-Saturday-Sunday triplet, only every 823 years. To programmers, that might seem just absurd, but a lot of people believe it without thinking about it: that’s how it becomes the popular internet meme. Continue reading “Use DateTime to disprove internet calendar memes”
Category: DateTime
Compare dates as strings when you can.
Just because you find a module that does something doesn’t mean that you have to use it. There are many excellent date and time modules on CPAN, including most people’s favorite, DateTime. In your heady rush for program purity and elegance, don’t think that you always have to use objects to do your work. Sometimes the overhead of objects, which have to call (perhaps many) subroutines to do their work, is too expensive. Continue reading “Compare dates as strings when you can.”