| 1 |
# Copyright (c) 1995-2026 Sullivan Beck. All rights reserved. |
| 2 |
# This program is free software; you can redistribute it and/or modify it |
| 3 |
# under the same terms as Perl itself. |
| 4 |
|
| 5 |
=pod |
| 6 |
|
| 7 |
=head1 NAME |
| 8 |
|
| 9 |
Date::Manip - Date manipulation routines |
| 10 |
|
| 11 |
=head1 DESCRIPTION |
| 12 |
|
| 13 |
Date::Manip is a series of modules designed to make any common |
| 14 |
date/time operation easy to do. Operations such as comparing two |
| 15 |
times, determining a date a given amount of time from another, or |
| 16 |
parsing international times are all easily done. It deals with time |
| 17 |
as it is used in the Gregorian calendar (the one currently in use) |
| 18 |
with full support for time changes due to daylight saving time. |
| 19 |
|
| 20 |
From the very beginning, the main focus of Date::Manip has been to be |
| 21 |
able to do ANY desired date/time operation easily. Many other modules |
| 22 |
exist which may do a subset of these operations quicker or more |
| 23 |
efficiently, but no other module can do all of the operations |
| 24 |
available in Date::Manip. |
| 25 |
|
| 26 |
Date::Manip has functionality to work with several fundamental types |
| 27 |
of data. |
| 28 |
|
| 29 |
=over 4 |
| 30 |
|
| 31 |
=item B<dates> |
| 32 |
|
| 33 |
The word date is used extensively here and is somewhat misleading. In |
| 34 |
Date::Manip, a date consists of three pieces of information: a |
| 35 |
calendar date (year, month, day), a time of day (hour, minute, |
| 36 |
second), and time zone information. Calendar dates and times are fully |
| 37 |
handled. Time zones are handled as well, but depending on how you use |
| 38 |
Date::Manip, there may be some limitations as discussed below. |
| 39 |
|
| 40 |
=item B<delta> |
| 41 |
|
| 42 |
A delta is an amount of time (i.e. the amount of time between two |
| 43 |
different dates). Think of it as the duration of an event or the |
| 44 |
amount of time between two dates. |
| 45 |
|
| 46 |
A delta refers only to an amount of time. It includes no information |
| 47 |
about a starting or ending date/time. Most people will think of a delta |
| 48 |
as an amount of time, but the term 'time' is already used so much in this |
| 49 |
module that I didn't want to use it here in order to avoid confusion. |
| 50 |
|
| 51 |
=item B<recurrence> |
| 52 |
|
| 53 |
A recurring event is something which occurs on a regular recurring |
| 54 |
basis. |
| 55 |
|
| 56 |
=item B<holidays> and B<events> |
| 57 |
|
| 58 |
Holidays and events are basically named dates or recurrences. |
| 59 |
|
| 60 |
=back |
| 61 |
|
| 62 |
Among other things, Date::Manip allow you to: |
| 63 |
|
| 64 |
=over 4 |
| 65 |
|
| 66 |
=item B<*> |
| 67 |
|
| 68 |
Enter a date in practically any format you choose. |
| 69 |
|
| 70 |
=item B<*> |
| 71 |
|
| 72 |
Compare two dates, entered in widely different formats to determine |
| 73 |
which is earlier. |
| 74 |
|
| 75 |
=item B<*> |
| 76 |
|
| 77 |
Extract any information you want from a date using a format string |
| 78 |
similar to the Unix date command. |
| 79 |
|
| 80 |
=item B<*> |
| 81 |
|
| 82 |
Determine the amount of time between two dates, or add an amount of |
| 83 |
time (a delta) to a date to get a second date. |
| 84 |
|
| 85 |
=item B<*> |
| 86 |
|
| 87 |
Work with dates using international formats (foreign month |
| 88 |
names, 12/10/95 referring to October rather than December, etc.). |
| 89 |
|
| 90 |
=item B<*> |
| 91 |
|
| 92 |
Convert dates from one timezone to another. |
| 93 |
|
| 94 |
=item B<*> |
| 95 |
|
| 96 |
To find a list of dates where a recurring event happens. |
| 97 |
|
| 98 |
=back |
| 99 |
|
| 100 |
Each of these tasks is trivial (one or two lines at most) with this package. |
| 101 |
|
| 102 |
=head1 HOW TO USE DATE::MANIP |
| 103 |
|
| 104 |
There are three different ways to use Date::Manip . There are three |
| 105 |
interfaces (version 5 functional interface, version 6 functional, and |
| 106 |
version 6 object-oriented). A complete description of each is |
| 107 |
included in the L<Date::Manip::Interfaces> document. The recommended |
| 108 |
(and the only one with access to the full functionality of the module) |
| 109 |
is using the Object-Oriented interface. |
| 110 |
|
| 111 |
=head1 SEE ALSO |
| 112 |
|
| 113 |
Because Date::Manip performs so many operations, the documentation is |
| 114 |
extensive. It includes the following documents: |
| 115 |
|
| 116 |
=head2 Information about the different interfaces |
| 117 |
|
| 118 |
Read this for a detailed description of each of the interfaces, |
| 119 |
including information on how to choose and use the interface |
| 120 |
best suited to your situation. |
| 121 |
|
| 122 |
=over 4 |
| 123 |
|
| 124 |
=item L<Date::Manip::Interfaces> |
| 125 |
|
| 126 |
A complete description of the functional interfaces available. NOTE: |
| 127 |
it is recommended that you use the OO interface wherever possible |
| 128 |
as the functional interfaces have some limitations. |
| 129 |
|
| 130 |
=back |
| 131 |
|
| 132 |
=head2 A description of the functional interfaces: |
| 133 |
|
| 134 |
=over 4 |
| 135 |
|
| 136 |
=item L<Date::Manip::DM5> |
| 137 |
|
| 138 |
The version 5 functional interface |
| 139 |
|
| 140 |
=item L<Date::Manip::DM6> |
| 141 |
|
| 142 |
The version 6 functional interface |
| 143 |
|
| 144 |
=back |
| 145 |
|
| 146 |
=head2 Objects and configuration |
| 147 |
|
| 148 |
An introduction to the Date::Manip classes used by the object-oriented |
| 149 |
interface and how to configure them: |
| 150 |
|
| 151 |
=over 4 |
| 152 |
|
| 153 |
=item L<Date::Manip::Objects> |
| 154 |
|
| 155 |
An overview of the various Date::Manip modules, and how to use them. |
| 156 |
|
| 157 |
=item L<Date::Manip::Config> |
| 158 |
|
| 159 |
Information for configuring Date::Manip |
| 160 |
|
| 161 |
=back |
| 162 |
|
| 163 |
=head2 Date::Manip object-oriented modules |
| 164 |
|
| 165 |
These are the modules for using the object-oriented interface. |
| 166 |
|
| 167 |
=over 4 |
| 168 |
|
| 169 |
=item L<Date::Manip::Obj> |
| 170 |
|
| 171 |
This is the base class. All other classes listed here inherit the |
| 172 |
methods defined in this class. |
| 173 |
|
| 174 |
=item L<Date::Manip::Base> |
| 175 |
|
| 176 |
A module for doing low-level date operations. |
| 177 |
|
| 178 |
=item L<Date::Manip::TZ> |
| 179 |
|
| 180 |
A module for working with time zones. |
| 181 |
|
| 182 |
=item L<Date::Manip::Date> |
| 183 |
|
| 184 |
The module for working with dates. |
| 185 |
|
| 186 |
=item L<Date::Manip::Delta> |
| 187 |
|
| 188 |
The module for working with deltas (amount of time). |
| 189 |
|
| 190 |
=item L<Date::Manip::Recur> |
| 191 |
|
| 192 |
The module for working with recurrences (recurring dates). |
| 193 |
|
| 194 |
=back |
| 195 |
|
| 196 |
=head2 Timezone information |
| 197 |
|
| 198 |
=over 4 |
| 199 |
|
| 200 |
=item L<Date::Manip::DM5abbrevs> |
| 201 |
|
| 202 |
Time zone abbreviations used in the version 5 interface. |
| 203 |
|
| 204 |
=item L<Date::Manip::Zones> |
| 205 |
|
| 206 |
Time zone data included in Date::Manip used in the version 6 |
| 207 |
interfaces. |
| 208 |
|
| 209 |
=back |
| 210 |
|
| 211 |
=head2 Miscellaneous information: |
| 212 |
|
| 213 |
=over 4 |
| 214 |
|
| 215 |
=item L<Date::Manip::Calc> |
| 216 |
|
| 217 |
Detailed information on how date calculations are done. |
| 218 |
|
| 219 |
=item L<Date::Manip::Holidays> |
| 220 |
|
| 221 |
Information on defining and using holidays and events. |
| 222 |
|
| 223 |
=item L<Date::Manip::ConfigFile> |
| 224 |
|
| 225 |
A sample config file. |
| 226 |
|
| 227 |
=item L<Date::Manip::Lang> |
| 228 |
|
| 229 |
Information about the languages supported by Date::Manip and how |
| 230 |
to add a new language. |
| 231 |
|
| 232 |
=item L<Date::Manip::Lang::english> |
| 233 |
|
| 234 |
=item L<Date::Manip::Lang::catalan> |
| 235 |
|
| 236 |
=item L<Date::Manip::Lang::danish> |
| 237 |
|
| 238 |
=item L<Date::Manip::Lang::dutch> |
| 239 |
|
| 240 |
=item L<Date::Manip::Lang::finnish> |
| 241 |
|
| 242 |
=item L<Date::Manip::Lang::french> |
| 243 |
|
| 244 |
=item L<Date::Manip::Lang::german> |
| 245 |
|
| 246 |
=item L<Date::Manip::Lang::italian> |
| 247 |
|
| 248 |
=item L<Date::Manip::Lang::norwegian> |
| 249 |
|
| 250 |
=item L<Date::Manip::Lang::polish> |
| 251 |
|
| 252 |
=item L<Date::Manip::Lang::portugue> |
| 253 |
|
| 254 |
=item L<Date::Manip::Lang::romanian> |
| 255 |
|
| 256 |
=item L<Date::Manip::Lang::russian> |
| 257 |
|
| 258 |
=item L<Date::Manip::Lang::spanish> |
| 259 |
|
| 260 |
=item L<Date::Manip::Lang::swedish> |
| 261 |
|
| 262 |
=item L<Date::Manip::Lang::turkish> |
| 263 |
|
| 264 |
A description of the parseable words in each language currently |
| 265 |
supported by Date::Manip. |
| 266 |
|
| 267 |
=back |
| 268 |
|
| 269 |
=head2 Information about the module and administrative things: |
| 270 |
|
| 271 |
=over 4 |
| 272 |
|
| 273 |
=item L<Date::Manip::Migration5to6> |
| 274 |
|
| 275 |
Information on changes necessary to scripts when upgrading from |
| 276 |
5.xx to 6.xx. |
| 277 |
|
| 278 |
=item L<Date::Manip::Changes5> |
| 279 |
|
| 280 |
Change log for Date::Manip 5.xx |
| 281 |
|
| 282 |
=item L<Date::Manip::Changes5to6> |
| 283 |
|
| 284 |
Differences between version 5.xx and 6.00 (including information |
| 285 |
on upgrading); this contains more details than the Migration5to6 |
| 286 |
document. |
| 287 |
|
| 288 |
=item L<Date::Manip::Changes6> |
| 289 |
|
| 290 |
Change log for Date::Manip 6.xx |
| 291 |
|
| 292 |
=item L<Date::Manip::Misc> |
| 293 |
|
| 294 |
Miscellaneous information about Date::Manip (who should use it; |
| 295 |
acknowledgments). |
| 296 |
|
| 297 |
Since many other date/time modules exist, some of which may do the |
| 298 |
specific operation(s) you need faster, be sure to read |
| 299 |
L<Date::Manip::Misc/"SHOULD I USE DATE::MANIP"> before |
| 300 |
deciding which of the Date and Time modules from CPAN is for you. |
| 301 |
However, if you want one module to do it all, Date::Manip is the |
| 302 |
one to use. |
| 303 |
|
| 304 |
=item L<Date::Manip::History> |
| 305 |
|
| 306 |
Musings on the history of Date::Manip written around it's |
| 307 |
20th birthday. |
| 308 |
|
| 309 |
=item L<Date::Manip::Problems> |
| 310 |
|
| 311 |
Common problems and instructions for reporting bugs. |
| 312 |
|
| 313 |
=item L<Date::Manip::Examples> |
| 314 |
|
| 315 |
Examples of how to use Date::Manip. |
| 316 |
|
| 317 |
=back |
| 318 |
|
| 319 |
=head1 LICENSE |
| 320 |
|
| 321 |
This script is free software; you can redistribute it and/or |
| 322 |
modify it under the same terms as Perl itself. |
| 323 |
|
| 324 |
=head1 AUTHOR |
| 325 |
|
| 326 |
Sullivan Beck (https://github.com/SBECK-github/) |
| 327 |
|
| 328 |
=cut |