Date print formats Perl Date::Manip

Perl Date::Manip is one of the modules which I use a lot. It’s a wonderful lib and has very clean API with great documentation. Below is a quick look at Date::Manip print format options which sometimes is very handy. For detailed interpretation and other options encourage to go through Date::Manip on CPAN


my $present_date_hash = Date::Manip::Date->new("today");
my $present_date = $present_date_hash->printf("%Y-%m-%d %H:%M:%S");

Happy Coding!

also, can check my previous article on generating date patterns using Date::Manip

4 thoughts on “Date print formats Perl Date::Manip”

  1. Hi Dave,
    Thanks for your comment.
    Well, I have started using Date::Manip 5-6 years back when I was developing a reminder application and found Date::Manip::Recur very handy and useful for generating recurring dates pattern. After that Date::Manip is my go-to module for manipulation task. It solves my problem and never disappointed so far. Yes, its huge module but I am used to it 🙂

    Thanks for suggesting DateTime, will definitely have a look next time.

    btw I am a huge fan of your books work. Keep up the good work.

    Greetings from New Delhi.


  2. I would have to agree about Date::Manip being huge and complicated.

    Finding the documentation you need can also be very difficult.

    However sometimes Date::Manip just fits the bill, particularly when incoming dates may be in arbitrary formats.

    Nonetheless thank you for this article.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.