Date::Manip(3)

πŸ’– Date::Manip πŸ’–

okay bestie, gather round, because we're talking about Date::Manip β€” the Perl date-manipulation routines that literally do everything πŸ—“οΈβœ¨


✨ NAME ✨

Date::Manip β€” date manipulation routines. yes that's it, that's the whole name, and it's iconic for it πŸ’…


🌸 DESCRIPTION 🌸

Date::Manip is a whole little series of modules built so that any common date/time operation is stupidly easy to do. comparing two times? determining what date is a given amount of time away from another? parsing international times? all of it, easy, no cap. it deals with time the way it's used in the Gregorian calendar (that's the one we're all living in rn) with full support for time changes caused by daylight saving time πŸ•°οΈπŸ’«

from the very beginning, the main focus of Date::Manip has been to do ANY desired date/time operation easily. sure, lots of other modules exist that might do a subset of these operations quicker or more efficiently, but no other module can do all of the operations available in Date::Manip. periodt. πŸ‘‘

Date::Manip has functionality to work with several fundamental types of data πŸ‘‡

πŸ—“οΈ dates

the word date is used a LOT here and honestly it's a little misleading. in Date::Manip, a date is three pieces of information bundled up: a calendar date (year, month, day), a time of day (hour, minute, second), and time zone info. calendar dates and times are fully handled. time zones are handled as well, but depending on how you use Date::Manip, there may be some limitations, which we get into below 🫢

⏳ delta

a delta is an amount of time (like, the amount of time between two different dates). think of it as the duration of an event, or how long it takes to get from one date to another.

a delta refers only to an amount of time. it carries zero information about a starting or ending date/time. most people would just call this "an amount of time," but the term time is already used sooo much in this module that the author didn't want to use it here and cause chaos. fair tbh πŸ™ˆ

πŸ” recurrence

a recurring event is something that occurs on a regular recurring basis. that's it, that's the vibe. πŸ”„

πŸŽ‰ holidays and events

holidays and events are basically just named dates or recurrences. cute, convenient, obsessed. πŸŽ€


among other things, Date::Manip lets you:

  • enter a date in practically any format you choose πŸ¦‹
  • compare two dates entered in wildly different formats to figure out which one is earlier
  • extract any info you want from a date using a format string similar to the Unix date command
  • determine the amount of time between two dates, or add an amount of time (a delta) to a date to get a second date βž•
  • work with dates using international formats (foreign month names, 12/10/95 referring to October rather than December, etc.) 🌍
  • convert dates from one timezone to another
  • find a list of dates where a recurring event happens πŸ“…

each of these tasks is trivial (one or two lines at most) with this package. not me being dramatic, it's literally true πŸ’…


🧚 HOW TO USE DATE::MANIP 🧚

there are three different ways to use Date::Manip. there are three interfaces:

  • the version 5 functional interface
  • the version 6 functional interface
  • the version 6 object-oriented interface

a complete description of each one lives in the Date::Manip::Interfaces document. the recommended one β€” and the only one with access to the full functionality of the module β€” is using the Object-Oriented interface πŸ‘‘βœ¨


πŸ”₯ SEE ALSO πŸ”₯

because Date::Manip performs SO many operations, the documentation is extensive. it includes the following documents:

πŸ“– Information about the different interfaces

read this for a detailed description of each of the interfaces, including info on how to choose and use the interface best suited to your situation.

  • Date::Manip::Interfaces β€” a complete description of the functional interfaces available. NOTE: it is recommended that you use the OO interface wherever possible, as the functional interfaces have some limitations.

πŸ› οΈ A description of the functional interfaces:

  • Date::Manip::DM5 β€” the version 5 functional interface
  • Date::Manip::DM6 β€” the version 6 functional interface

βš™οΈ Objects and configuration

an introduction to the Date::Manip classes used by the object-oriented interface and how to configure them:

  • Date::Manip::Objects β€” an overview of the various Date::Manip modules, and how to use them.
  • Date::Manip::Config β€” information for configuring Date::Manip

πŸ’Ž Date::Manip object-oriented modules

these are the modules for using the object-oriented interface.

  • Date::Manip::Obj β€” this is the base class. all other classes listed here inherit the methods defined in this class.
  • Date::Manip::Base β€” a module for doing low-level date operations.
  • Date::Manip::TZ β€” a module for working with time zones.
  • Date::Manip::Date β€” the module for working with dates.
  • Date::Manip::Delta β€” the module for working with deltas (amount of time).
  • Date::Manip::Recur β€” the module for working with recurrences (recurring dates).

🌍 Timezone information

  • Date::Manip::DM5abbrevs β€” time zone abbreviations used in the version 5 interface.
  • Date::Manip::Zones β€” time zone data included in Date::Manip used in the version 6 interfaces.

πŸ“ Miscellaneous information:

  • Date::Manip::Calc β€” detailed information on how date calculations are done.
  • Date::Manip::Holidays β€” information on defining and using holidays and events.
  • Date::Manip::ConfigFile β€” a sample config file.
  • Date::Manip::Lang β€” information about the languages supported by Date::Manip and how to add a new language.
  • Date::Manip::Lang::english
  • Date::Manip::Lang::catalan
  • Date::Manip::Lang::danish
  • Date::Manip::Lang::dutch
  • Date::Manip::Lang::finnish
  • Date::Manip::Lang::french
  • Date::Manip::Lang::german
  • Date::Manip::Lang::italian
  • Date::Manip::Lang::norwegian
  • Date::Manip::Lang::polish
  • Date::Manip::Lang::portugue
  • Date::Manip::Lang::romanian
  • Date::Manip::Lang::russian
  • Date::Manip::Lang::spanish
  • Date::Manip::Lang::swedish
  • Date::Manip::Lang::turkish

a description of the parseable words in each language currently supported by Date::Manip. πŸ—£οΈ

πŸ“¦ Information about the module and administrative things:

  • Date::Manip::Migration5to6 β€” information on changes necessary to scripts when upgrading from 5.xx to 6.xx.
  • Date::Manip::Changes5 β€” change log for Date::Manip 5.xx
  • Date::Manip::Changes5to6 β€” differences between version 5.xx and 6.00 (including information on upgrading); this contains more details than the Migration5to6 document.
  • Date::Manip::Changes6 β€” change log for Date::Manip 6.xx
  • Date::Manip::Misc β€” miscellaneous information about Date::Manip (who should use it; acknowledgments).
since many other date/time modules exist, some of which may do the specific operation(s) you need faster, be sure to read "SHOULD I USE DATE::MANIP" in Date::Manip::Misc before deciding which of the Date and Time modules from CPAN is for you. however, if you want one module to do it all, Date::Manip is the one to use. πŸ’―
  • Date::Manip::History β€” musings on the history of Date::Manip written around it's 20th birthday. πŸŽ‚
  • Date::Manip::Problems β€” common problems and instructions for reporting bugs. πŸ›
  • Date::Manip::Examples β€” examples of how to use Date::Manip.

πŸ“œ LICENSE πŸ“œ

this script is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Sullivan Beck (https://github.com/SBECK-github/) β€” thank you king πŸ™‡β€β™€οΈπŸ’–


and that's the whole page bestie!! this was Date::Manip from perl v5.42.3, dated 2026-09-01 🌈✨ go forth and manipulate some dates, you've got this πŸ’…πŸŽ€

πŸ“¦ where this page comes from