2008-08-04 02:48:58 +00:00
|
|
|
#
|
2011-03-09 10:59:47 +00:00
|
|
|
# spec file for package perl-Date-Manip
|
2008-08-04 02:48:58 +00:00
|
|
|
#
|
2023-03-10 10:42:49 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2008-08-04 02:48:58 +00:00
|
|
|
#
|
2009-06-18 15:01:14 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-06 15:47:40 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-08-04 02:48:58 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-03-02 10:50:10 +00:00
|
|
|
%define cpan_name Date-Manip
|
2008-08-04 02:48:58 +00:00
|
|
|
Name: perl-Date-Manip
|
2023-06-13 07:33:36 +00:00
|
|
|
Version: 6.92
|
2012-01-13 12:39:25 +00:00
|
|
|
Release: 0
|
2018-03-02 15:58:37 +00:00
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
2022-06-16 14:05:20 +00:00
|
|
|
Summary: Date manipulation routines
|
2020-06-02 10:19:32 +00:00
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
2017-03-06 07:05:23 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/S/SB/SBECK/%{cpan_name}-%{version}.tar.gz
|
2015-04-19 07:32:30 +00:00
|
|
|
Source1: cpanspec.yml
|
2012-03-06 07:34:36 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: perl
|
2010-01-11 16:06:54 +00:00
|
|
|
BuildRequires: perl-macros
|
2021-11-16 14:27:56 +00:00
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.67_01
|
2019-06-04 06:39:47 +00:00
|
|
|
BuildRequires: perl(Test::Inter) >= 1.09
|
2012-03-06 07:34:36 +00:00
|
|
|
%{perl_requires}
|
2008-08-04 02:48:58 +00:00
|
|
|
|
|
|
|
%description
|
2010-01-11 16:06:54 +00:00
|
|
|
Date::Manip is a series of modules designed to make any common date/time
|
2012-03-06 07:34:36 +00:00
|
|
|
operation easy to do. Operations such as comparing two times, determining a
|
2013-12-09 11:25:36 +00:00
|
|
|
date a given amount of time from another, or parsing international times
|
2012-03-06 07:34:36 +00:00
|
|
|
are all easily done. It deals with time as it is used in the Gregorian
|
|
|
|
calendar (the one currently in use) with full support for time changes due
|
|
|
|
to daylight saving time.
|
|
|
|
|
|
|
|
From the very beginning, the main focus of Date::Manip has been to be able
|
|
|
|
to do ANY desired date/time operation easily. Many other modules exist
|
|
|
|
which may do a subset of these operations quicker or more efficiently, but
|
|
|
|
no other module can do all of the operations available in Date::Manip.
|
|
|
|
|
2013-10-04 11:56:31 +00:00
|
|
|
Date::Manip has functionality to work with several fundamental types of
|
|
|
|
data.
|
|
|
|
|
|
|
|
* *dates*
|
|
|
|
|
2015-12-02 21:04:48 +00:00
|
|
|
The word date is used extensively here and is somewhat misleading. In
|
|
|
|
Date::Manip, a date consists of three pieces of information: a calendar
|
2018-03-02 15:58:37 +00:00
|
|
|
date (year, month, day), a time of day (hour, minute, second), and time
|
|
|
|
zone information. 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 as discussed below.
|
2013-10-04 11:56:31 +00:00
|
|
|
|
|
|
|
* *delta*
|
|
|
|
|
2015-12-02 21:04:48 +00:00
|
|
|
A delta is an amount of time (i.e. the amount of time between two different
|
2018-03-02 15:58:37 +00:00
|
|
|
dates). Think of it as the duration of an event or the amount of time
|
|
|
|
between two dates.
|
|
|
|
|
|
|
|
A delta refers only to an amount of time. It includes no information about
|
|
|
|
a starting or ending date/time. Most people will think of a delta as an
|
|
|
|
amount of time, but the term 'time' is already used so much in this module
|
|
|
|
that I didn't want to use it here in order to avoid confusion.
|
2013-10-04 11:56:31 +00:00
|
|
|
|
|
|
|
* *recurrence*
|
|
|
|
|
2015-12-02 21:04:48 +00:00
|
|
|
A recurring event is something which occurs on a regular recurring basis.
|
2013-10-04 11:56:31 +00:00
|
|
|
|
|
|
|
* *holidays* and *events*
|
|
|
|
|
2015-12-02 21:04:48 +00:00
|
|
|
Holidays and events are basically named dates or recurrences.
|
2013-10-04 11:56:31 +00:00
|
|
|
|
|
|
|
Among other things, Date::Manip allow you to:
|
|
|
|
|
|
|
|
* ***
|
|
|
|
|
2015-12-02 21:04:48 +00:00
|
|
|
Enter a date in practically any format you choose.
|
2013-10-04 11:56:31 +00:00
|
|
|
|
|
|
|
* ***
|
|
|
|
|
2015-12-02 21:04:48 +00:00
|
|
|
Compare two dates, entered in widely different formats to determine which
|
|
|
|
is earlier.
|
2013-10-04 11:56:31 +00:00
|
|
|
|
|
|
|
* ***
|
|
|
|
|
2015-12-02 21:04:48 +00:00
|
|
|
Extract any information you want from a date using a format string similar
|
|
|
|
to the Unix date command.
|
2013-10-04 11:56:31 +00:00
|
|
|
|
|
|
|
* ***
|
|
|
|
|
2018-03-02 15:58:37 +00:00
|
|
|
Determine the amount of time between two dates, or add an amount of time (a
|
|
|
|
delta) to a date to get a second date.
|
2013-10-04 11:56:31 +00:00
|
|
|
|
|
|
|
* ***
|
|
|
|
|
2018-06-18 08:04:18 +00:00
|
|
|
Work with dates using international formats (foreign month names, 12/10/95
|
|
|
|
referring to October rather than December, etc.).
|
2013-10-04 11:56:31 +00:00
|
|
|
|
|
|
|
* ***
|
|
|
|
|
2018-03-02 15:58:37 +00:00
|
|
|
Convert dates from one timezone to another.
|
|
|
|
|
|
|
|
* ***
|
|
|
|
|
2015-12-02 21:04:48 +00:00
|
|
|
To find a list of dates where a recurring event happens.
|
2013-10-04 11:56:31 +00:00
|
|
|
|
|
|
|
Each of these tasks is trivial (one or two lines at most) with this
|
|
|
|
package.
|
|
|
|
|
2008-08-04 02:48:58 +00:00
|
|
|
%prep
|
2021-03-02 10:50:10 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{version}
|
2023-03-10 10:42:49 +00:00
|
|
|
|
2023-06-13 07:33:36 +00:00
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
2008-08-04 02:48:58 +00:00
|
|
|
|
|
|
|
%build
|
2018-12-06 15:47:40 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
2021-03-02 10:50:10 +00:00
|
|
|
%make_build
|
2008-08-04 02:48:58 +00:00
|
|
|
|
|
|
|
%check
|
2018-12-06 15:47:40 +00:00
|
|
|
make test
|
2008-08-04 02:48:58 +00:00
|
|
|
|
|
|
|
%install
|
2015-12-02 21:04:48 +00:00
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
2010-01-11 16:06:54 +00:00
|
|
|
%perl_gen_filelist
|
2008-08-04 02:48:58 +00:00
|
|
|
|
2010-01-11 16:06:54 +00:00
|
|
|
%files -f %{name}.files
|
2017-03-06 07:05:23 +00:00
|
|
|
%doc Changes examples README README.first
|
|
|
|
%license LICENSE
|
2008-08-04 02:48:58 +00:00
|
|
|
|
|
|
|
%changelog
|