1
0
forked from pool/perl-TimeDate
Stephan Kulow 2017-10-08 09:54:39 +00:00 committed by Git OBS Bridge
parent c4c9a1329a
commit 81e45bb3bf
2 changed files with 33 additions and 25 deletions

View File

@ -1,23 +1,18 @@
---
#description_paragraphs: 3
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module
description: |-
Date::Parse provides two routines for parsing date strings into time values.
str2time(DATE [, ZONE])
str2time parses DATE and returns a unix time value, or undef upon failure.
ZONE, if given, specifies the timezone to assume when parsing if the date
string does not specify a timezome.
strptime(DATE [, ZONE])
strptime takes the same arguments as str2time but returns an array of values
($ss,$mm,$hh,$day,$month,$year,$zone). Elements are only defined if they
could be extracted from the date string. The $zone element is the timezone
offset in seconds from GMT. An empty array is returned upon failure.

View File

@ -24,7 +24,7 @@ Summary: TimeDate Perl module
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/TimeDate/
Source0: http://www.cpan.org/authors/id/G/GB/GBARR/%{cpan_name}-%{version}.tar.gz
Source0: https://cpan.metacpan.org/authors/id/G/GB/GBARR/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -33,11 +33,24 @@ BuildRequires: perl-macros
%{perl_requires}
%description
TimeDate Perl module
Date::Parse provides two routines for parsing date strings into time values.
str2time(DATE [, ZONE])
str2time parses DATE and returns a unix time value, or undef upon failure.
ZONE, if given, specifies the timezone to assume when parsing if the date
string does not specify a timezome.
strptime(DATE [, ZONE])
strptime takes the same arguments as str2time but returns an array of values
($ss,$mm,$hh,$day,$month,$year,$zone). Elements are only defined if they
could be extracted from the date string. The $zone element is the timezone
offset in seconds from GMT. An empty array is returned upon failure.
%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f -print0 | xargs -0 chmod 644
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor