Files
perl-Date-JD/perl-Date-JD.spec
2025-08-12 18:13:12 +02:00

84 lines
3.1 KiB
RPMSpec

#
# spec file for package perl-Date-JD
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
%define cpan_name Date-JD
Name: perl-Date-JD
Version: 0.6.0
Release: 0
# 0.006 -> normalize -> 0.6.0
%define cpan_version 0.006
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Conversion between flavours of Julian Date
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Module::Build)
BuildRequires: perl(parent)
Requires: perl(parent)
Provides: perl(Date::JD) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
For date and time calculations it is convenient to represent dates by a
simple linear count of days, rather than in a particular calendar. This is
such a good idea that it has been invented several times. If there were a
single such linear count then it would be the obvious data interchange
format between calendar modules. With several versions, calendar modules
can use such sensible data formats and still have interoperability
problems. This module tackles that problem, by performing conversions
between different flavours of day count. These day count systems are
generically known as "Julian Dates", after the most venerable of them.
Among Julian Date systems there are also some non-trivial differences of
concept. There are systems that count only complete days, and those that
count fractional days also. There are some that are fixed to Universal Time
(time on the prime meridian), and others that are interpreted according to
a timezone. Some consider the day to start at noon and others at midnight,
which is semantically significant for the complete-day counts. The
functions of this module appropriately handle the semantics of all the
non-trivial conversions.
The day count systems supported by this module are Julian Date, Reduced
Julian Date, Modified Julian Date, Dublin Julian Date, Truncated Julian
Date, Chronological Julian Date, Rata Die, and Lilian Date, each in both
integral and fractional forms.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Build.PL --installdirs=vendor
./Build build --flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install --destdir=%{buildroot} --create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%doc Changes README
%changelog