File perl-Date-WeekOfYear.spec of Package perl-Date-WeekOfYear
#
# spec file for package perl-Date-WeekOfYear
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: perl-Date-WeekOfYear
Version: 1.07
Release: 0
%define cpan_name Date-WeekOfYear
Summary: Simple routine to return the ISO 8601 week of the year (as well as the I[cut]
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
Url: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/G/GN/GNG/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
%description
Date::WeekOfYear is small and efficient. The only purpose is to return the
week of the year. This can be called in either a scalar or list context.
In a scalar context, just the week number is returned (the year starts at
week 1).
In a list context, both the week number and the year (YYYY) are returned.
This ensures that you know which year the week number relates too. This is
only an issue in the week where the year changes (ie depending on the day
you can be in either week 52, week 53 or week 1.
*NOTE* The year returned is not always the same as the Gregorian year for
that day for further details see ISO 8601.
To obtain the old functionality, a mode is also passed, WOY_OLD_MODE. Note
you need to use the ':mode' or ':all' tags to use to gain access to
WOY_OLD_MODE.
If mode WOY_ISO_MODE is used the output will be in the ISO 8601 format
YYYY-Wxx where YYYY is the year and xx is the two digit week number and 'W'
denotes week.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README WeekOfYear.html
%changelog