view release on metacpan or search on metacpan
lib/AMF/Connection.pm view on Meta::CPAN
return bless($self, $class);
};
# plus add paramters, referer, user agent, authentication/credentials ( see also SecureAMFChannel stuff ),
# plus timezone on retunred dates to pass to de-serializer - see AMF3 spec saying "it is suggested that time zone be queried independnetly as needed" - unelss local DateTime default to right locale!
# we pass the string, and let Storable::AMF to parse the options into a scalar - see Input/OutputStream and Storable::AMF0 documentation
sub setInputAMFOptions {
my ($class, $options) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Assembla.pm view on Meta::CPAN
BEGIN {
$API::Assembla::VERSION = '0.03';
}
use Moose;
use DateTime::Format::ISO8601;
use LWP::UserAgent;
use URI;
use XML::XPath;
use API::Assembla::Space;
lib/API/Assembla.pm view on Meta::CPAN
my $space = $xp->find('/space')->pop;
my $name = $space->findvalue('name')."";
return API::Assembla::Space->new(
id => $space->findvalue('id').'',
created_at => DateTime::Format::ISO8601->parse_datetime($space->findvalue('created-at').''),
name => $name,
description => $space->findvalue('description').'',
);
}
lib/API/Assembla.pm view on Meta::CPAN
my $name = $space->findvalue('name')."";
$objects{$name} = API::Assembla::Space->new(
id => $space->findvalue('id').'',
created_at => DateTime::Format::ISO8601->parse_datetime($space->findvalue('created-at').''),
name => $name,
description => $space->findvalue('description').'',
);
}
lib/API/Assembla.pm view on Meta::CPAN
my $ticket = $xp->find('/ticket')->pop;
return API::Assembla::Ticket->new(
id => $ticket->findvalue('id').'',
created_on => DateTime::Format::ISO8601->parse_datetime($ticket->findvalue('created-on').''),
description => $ticket->findvalue('description').'',
number => $ticket->findvalue('number').'',
priority => $ticket->findvalue('priority').'',
status_name => $ticket->findvalue('status-name').'',
summary => $ticket->findvalue('summary').''
lib/API/Assembla.pm view on Meta::CPAN
my $id = $ticket->findvalue('id').'';
$objects{$id} = API::Assembla::Ticket->new(
id => $id,
created_on => DateTime::Format::ISO8601->parse_datetime($ticket->findvalue('created-on').''),
description => $ticket->findvalue('description').'',
number => $ticket->findvalue('number').'',
priority => $ticket->findvalue('priority').'',
status_name => $ticket->findvalue('status-name').'',
summary => $ticket->findvalue('summary').''
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Google/GCal.pm view on Meta::CPAN
my $gapi = API::Google::GCal->new({ tokensfile => 'config.json' });
my $user = 'someuser@gmail.com';
my $calendar_id = 'ooqfhagr1a91u1510ffdf7vfpk@group.calendar.google.com';
my $timeZone = 'Europe/Moscow';
my $event_start = DateTime->now->set_time_zone($timeZone);
my $event_end = DateTime->now->add_duration( DateTime::Duration->new( hours => 2) );
$gapi->refresh_access_token_silent($user); # inherits from API::Google
$gapi->get_calendars($user);
$gapi->get_calendars($user, ['id', 'summary']); # return only specified fields
lib/API/Google/GCal.pm view on Meta::CPAN
my $event_data = {};
$event_data->{summary} = 'Exibition';
$event_data->{description} = 'Amazing cats exibition';
$event_data->{location} = 'Angels av. 13';
$event_data->{start}{dateTime} = DateTime::Format::RFC3339->format_datetime($event_start); # '2016-11-11T09:00:00+03:00' format
$event_data->{end}{dateTime} = DateTime::Format::RFC3339->format_datetime($event_end);
$event_data->{start}{timeZone} = $event_data->{end}{timeZone} = $timeZone; # not obligatory
$gapi->add_event($user, $calendar_id, $event_data);
my $freebusy_data = {
user => $user,
calendarId => $calendar_id,
dt_start => DateTime::Format::RFC3339->format_datetime($event_start),
dt_end => DateTime::Format::RFC3339->format_datetime($event_end),
timeZone => 'Europe/Moscow'
};
$gapi->busy_time_ranges($freebusy_data);
view all matches for this distribution
view release on metacpan or search on metacpan
applications/collector-test.pl view on Meta::CPAN
$thour = int ($duration / 3600);
$tmin = int (int ($duration % 3600) / 60);
$tsec = int ($duration % 60);
$duration = sprintf("%02d:%02d:%02d", $thour, $tmin, $tsec);
} else {
my ($tyear, $tmonth, $tday, $thour, $tmin, $tsec, @startDateTime, @endDateTime, @diffDateTime);
($tyear, $tmonth, $tday) = split(/\//, $startDate);
($thour, $tmin, $tsec) = split(/\:/, $startTime);
@startDateTime = ($tyear, $tmonth, $tday, $thour, $tmin, $tsec);
($tyear, $tmonth, $tday) = split(/\//, $endDate);
($thour, $tmin, $tsec) = split(/\:/, $endTime);
@endDateTime = ($tyear, $tmonth, $tday, $thour, $tmin, $tsec);
@diffDateTime = Delta_DHMS(@startDateTime, @endDateTime);
$duration = sprintf("%02d:%02d:%02d", $diffDateTime[1], $diffDateTime[2], $diffDateTime[3]);
}
# my ($outputData, $performanceData) = split(/\|/, $returnStatus, 2);
my $_returnStatus = reverse $returnStatus;
my ($_outputData, $_performanceData) = reverse split(/\|/, $_returnStatus, 2);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/Networks.pm view on Meta::CPAN
package AWS::Networks;
use Moose;
use JSON;
use HTTP::Tiny;
use DateTime;
our $VERSION = '0.01';
has url => (
is => 'ro',
lib/AWS/Networks.pm view on Meta::CPAN
lazy => 1,
);
has sync_token => (
is => 'ro',
isa => 'DateTime',
default => sub {
return DateTime->from_epoch( epoch => shift->netinfo->{ syncToken } );
},
lazy => 1,
);
has networks => (
lib/AWS/Networks.pm view on Meta::CPAN
Returns the URL from which the information was retrieved. Returns undef on filtered datasets
=head2 sync_token
Returns a DateTime object created from the current timestamp of the syncToken reported from the service
=head2 networks
Returns an ArrayRef with HashRefs following the following structure:
view all matches for this distribution
view release on metacpan or search on metacpan
share/AXLSoap.xsd view on Meta::CPAN
</xsd:annotation>
</xsd:element>
<xsd:element name="trivialCredCheck" type="xsd:boolean" nillable="false"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="XDateTimeSetting">
<xsd:sequence minOccurs="0">
<xsd:element name="name" type="axlapi:String50"/>
<xsd:element name="dateTemplate" type="axlapi:String50"/>
<xsd:element name="timeZone" type="xsd:string"/><!--This field is of the type axl:XTimeZone in AXLEnums.xsd-->
</xsd:sequence>
share/AXLSoap.xsd view on Meta::CPAN
</xsd:annotation>
</xsd:element>
<xsd:element name="autoSearchSpaceName" type="axlapi:String50"/>
</xsd:choice>
<xsd:choice>
<xsd:element name="dateTimeSetting" type="axlapi:XDateTimeSetting">
<xsd:annotation>
<xsd:documentation>Only the uuid attribute is read by the AXL API. Not Nullable.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="dateTimeSettingName" type="axlapi:String50"/>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/2zicon.pm view on Meta::CPAN
use 5.008001;
use strict;
use warnings;
use Carp qw(croak);
use DateTime;
our $VERSION = "0.7";
my @members = qw(
MatobaKarin
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/BABYMETAL/Base.pm view on Meta::CPAN
package Acme::BABYMETAL::Base;
use strict;
use warnings;
use DateTime;
use base qw(Class::Accessor);
our $VERSION = '0.03';
__PACKAGE__->mk_accessors(qw(
lib/Acme/BABYMETAL/Base.pm view on Meta::CPAN
$self->{$_} = $info{$_} for keys %info;
$self->{name_ja} = $self->family_name_ja . $self->first_name_ja;
$self->{name_en} = $self->first_name_en . ' ' . $self->family_name_en;
my ($year, $month, $day) = ($self->{birthday} =~ /^(\d{4})-(\d{2})-(\d{2})$/);
$self->{age} = (DateTime->now - DateTime->new(
year => $year,
month => $month,
day => $day,
))->years;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/update100.pl view on Meta::CPAN
# -------------------------------------
# Library Modules
use CPAN::Changes;
#use Data::Dumper;
use DateTime;
use File::Basename;
use Getopt::Long;
use IO::File;
use Template;
use WWW::Mechanize;
examples/update100.pl view on Meta::CPAN
push @{$tvars{LIST2}}, sprintf " %2d. %3d %s%s%s", $cnt++, $new{$inx}{count}, $new{$inx}{pause}, (' ' x $pad), $new{$inx}{name};
}
# calculate copyright
$tvars{COPYRIGHT} = '2014';
my $year = DateTime->now->year;
$tvars{COPYRIGHT} .= "-$year" if($year > 2014);
# calculate version
$file = '../Changes';
my $changes = CPAN::Changes->load( $file );
examples/update100.pl view on Meta::CPAN
my $version = $releases[-1]->{version};
$version += 0.01;
$tvars{VERSION} = sprintf "%.2f", $version;
# update Changes file
my $release = CPAN::Changes::Release->new( version => $tvars{VERSION}, date => DateTime->now->ymd );
for my $group (qw(insert update delete)) {
next unless($changes{$group});
$release->add_changes(
{ group => $groups{$group} },
view all matches for this distribution
view release on metacpan or search on metacpan
examples/update100.pl view on Meta::CPAN
# -------------------------------------
# Library Modules
use CPAN::Changes;
#use Data::Dumper;
use DateTime;
use File::Basename;
use Getopt::Long;
use IO::File;
use Template;
use WWW::Mechanize;
examples/update100.pl view on Meta::CPAN
push @{$tvars{LIST2}}, sprintf " %2d. %3d %s%s%s", $cnt++, $new{$inx}{count}, $new{$inx}{pause}, (' ' x $pad), $new{$inx}{name};
}
# calculate copyright
$tvars{COPYRIGHT} = '2014';
my $year = DateTime->now->year;
$tvars{COPYRIGHT} .= "-$year" if($year > 2014);
# calculate version
$file = '../Changes';
my $changes = CPAN::Changes->load( $file );
examples/update100.pl view on Meta::CPAN
my $version = $releases[-1]->{version};
$version += 0.01;
$tvars{VERSION} = sprintf "%.2f", $version;
# update Changes file
my $release = CPAN::Changes::Release->new( version => $tvars{VERSION}, date => DateTime->now->ymd );
for my $group (qw(insert update delete)) {
next unless($changes{$group});
$release->add_changes(
{ group => $groups{$group} },
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/BKB/Japanese.pm view on Meta::CPAN
package Acme::CPANLists::Import::BKB::Japanese;
our $DATE = '2017-03-27'; # DATE
our $VERSION = '0.001'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in [https://www.lemoda.net/perl/cpan-japanese-language/index.html] (retrieved on 2017-03-27). Visit the URL for the full contents.",entries=>[{module=>"Da...
1;
# ABSTRACT: CPAN modules for dealing with the Japanese language (2012)
__END__
lib/Acme/CPANLists/Import/BKB/Japanese.pm view on Meta::CPAN
This list is generated by extracting module names mentioned in [https://www.lemoda.net/perl/cpan-japanese-language/index.html] (retrieved on 2017-03-27). Visit the URL for the full contents.
=over
=item * L<DateTime::Calendar::Japanese::Era>
=item * L<Lingua::JA::FindDates>
=item * L<Lingua::JA::Moji>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/PERLANCAR/GetoptModules.pm view on Meta::CPAN
package Acme::CPANLists::Import::PERLANCAR::GetoptModules;
our $DATE = '2016-12-26'; # DATE
our $VERSION = '0.001'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in [https://perlancar.wordpress.com/2016/12/02/getopt-modules-02-getoptstd/] (retrieved on 2016-12-26). Visit the URL for the full contents.",entries=>[{m...
1;
# ABSTRACT: Modules mentioned in PERLANCAR's mini-article series on Getopt modules (2016)
__END__
lib/Acme/CPANLists/Import/PERLANCAR/GetoptModules.pm view on Meta::CPAN
=item * L<App::Cmd>
=item * L<Config::Any>
=item * L<DateTime>
=item * L<Moose>
=item * L<MooseX::App::Cmd>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/PerlAdvent/2004.pm view on Meta::CPAN
package Acme::CPANLists::Import::PerlAdvent::2004;
our $DATE = '2016-11-07'; # DATE
our $VERSION = '0.001'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in [http://perladvent.org/2004/] (retrieved on 2016-11-07). Visit the URL for the full contents.",entries=>[{module=>"DateTime"},{module=>"DateTime::Durat...
1;
# ABSTRACT: Modules mentioned in Perl Advent Calendar 2004
__END__
lib/Acme/CPANLists/Import/PerlAdvent/2004.pm view on Meta::CPAN
This list is generated by extracting module names mentioned in [http://perladvent.org/2004/] (retrieved on 2016-11-07). Visit the URL for the full contents.
=over
=item * L<DateTime>
=item * L<DateTime::Duration>
=item * L<DateTime::Format::Duration>
=item * L<DateTime::Format::HTTP>
=item * L<Acme::Colour>
=item * L<Term::ANSIColor>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/PerlAdvent/2005.pm view on Meta::CPAN
package Acme::CPANLists::Import::PerlAdvent::2005;
our $DATE = '2016-11-07'; # DATE
our $VERSION = '0.001'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in [http://perladvent.org/2005/] (retrieved on 2016-11-07). Visit the URL for the full contents.",entries=>[{module=>"Acme::Code::FreedomFighter"},{module...
1;
# ABSTRACT: Modules mentioned in Perl Advent Calendar 2005
__END__
lib/Acme/CPANLists/Import/PerlAdvent/2005.pm view on Meta::CPAN
=item * L<Date::Christmas>
=item * L<Date::Parse>
=item * L<DateTime>
=item * L<Devel::DProf>
=item * L<Devel::Size>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/PerlAdvent/2006.pm view on Meta::CPAN
package Acme::CPANLists::Import::PerlAdvent::2006;
our $DATE = '2016-11-07'; # DATE
our $VERSION = '0.001'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in [http://perladvent.org/2006/] (retrieved on 2016-11-07). Visit the URL for the full contents.",entries=>[{module=>"Devel::FastProf"},{module=>"Devel::S...
1;
# ABSTRACT: Modules mentioned in Perl Advent Calendar 2006
__END__
lib/Acme/CPANLists/Import/PerlAdvent/2006.pm view on Meta::CPAN
=item * L<criticism>
=item * L<DBD::AnyData>
=item * L<DateTime::Calendar::Discordian>
=back
=head1 HOMEPAGE
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/PerlAdvent/2007_12_16.pm view on Meta::CPAN
package Acme::CPANLists::Import::PerlAdvent::2007_12_16;
our $DATE = '2016-11-07'; # DATE
our $VERSION = '0.001'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in [http://perladvent.org/2007/16/] (retrieved on 2016-11-07). Visit the URL for the full contents.",entries=>[{module=>"DateTime::TimeZone"}],summary=>"M...
1;
# ABSTRACT: Modules mentioned in Perl Advent Calendar 2007 (day 16)
__END__
lib/Acme/CPANLists/Import/PerlAdvent/2007_12_16.pm view on Meta::CPAN
This list is generated by extracting module names mentioned in [http://perladvent.org/2007/16/] (retrieved on 2016-11-07). Visit the URL for the full contents.
=over
=item * L<DateTime::TimeZone>
=back
=head1 HOMEPAGE
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/PerlAdvent/2012.pm view on Meta::CPAN
package Acme::CPANLists::Import::PerlAdvent::2012;
our $DATE = '2016-11-06'; # DATE
our $VERSION = '0.001'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in [http://perladvent.org/2012/] (retrieved on 2016-11-06). Visit the URL for the full contents.",entries=>[{module=>"File::Path"},{module=>"File::Spec"},...
1;
# ABSTRACT: Modules mentioned in Perl Advent Calendar 2012
__END__
lib/Acme/CPANLists/Import/PerlAdvent/2012.pm view on Meta::CPAN
=item * L<DDP>
=item * L<Data::Printer>
=item * L<DateTime>
=item * L<Digest>
=item * L<Digest::MD5>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/PerlAdvent/2013.pm view on Meta::CPAN
package Acme::CPANLists::Import::PerlAdvent::2013;
our $DATE = '2016-11-06'; # DATE
our $VERSION = '0.002'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in [http://perladvent.org/2013/] (retrieved on 2016-11-06). Visit the URL for the full contents.",entries=>[{module=>"RDF::Query"},{module=>"RDF::Query::C...
1;
# ABSTRACT: Modules mentioned in Perl Advent Calendar 2013
__END__
lib/Acme/CPANLists/Import/PerlAdvent/2013.pm view on Meta::CPAN
=item * L<Beam::Emitter>
=item * L<Moo>
=item * L<DateTime::Duration>
=item * L<Time::Duration>
=item * L<Time::Duration::Object>
lib/Acme/CPANLists/Import/PerlAdvent/2013.pm view on Meta::CPAN
=item * L<Role::HasPayload::Merged>
=item * L<String::Errf>
=item * L<DateTime>
=item * L<DateTime::Moonpig>
=item * L<Acme::Boom>
=item * L<Devel::cst>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/PerlAdvent/2014.pm view on Meta::CPAN
package Acme::CPANLists::Import::PerlAdvent::2014;
our $DATE = '2016-11-06'; # DATE
our $VERSION = '0.001'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in [http://perladvent.org/2014/] (retrieved on 2016-11-06). Visit the URL for the full contents.",entries=>[{module=>"File::Temp"},{module=>"Test::TempDir...
1;
# ABSTRACT: Modules mentioned in Perl Advent Calendar 2014
__END__
lib/Acme/CPANLists/Import/PerlAdvent/2014.pm view on Meta::CPAN
=item * L<namespace::autoclean>
=item * L<Data::ICal>
=item * L<Data::ICal::DateTime>
=item * L<DateTime>
=item * L<DateTime::Format::ICal>
=item * L<Capture::Tiny>
=item * L<Devel::Size>
lib/Acme/CPANLists/Import/PerlAdvent/2014.pm view on Meta::CPAN
=item * L<Plack::App::Path::Router::Custom>
=item * L<CLDR::Number>
=item * L<DateTime::Locale>
=item * L<Geo::Region>
=item * L<Locale::CLDR>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANLists/Import/DatesPart1.pm view on Meta::CPAN
package Acme::CPANLists::Import::DatesPart1;
our $DATE = '2016-12-28'; # DATE
our $VERSION = '0.03'; # VERSION
our @Module_Lists = ({description=>"This list is generated by extracting module names mentioned in the article [http://blogs.perl.org/users/buddy_burden/2015/09/a-date-with-cpan-part-1-state-of-the-union.html] (retrieved on 2016-07-19). For the full ...
1;
# ABSTRACT: CPAN modules for processing dates - Part 1 (2015)
__END__
lib/Acme/CPANLists/Import/DatesPart1.pm view on Meta::CPAN
=item * L<Class::Date>
=item * L<DBIx::Class>
=item * L<DBIx::Class::InflateColumn::DateTimeX::Immutable>
=item * L<Date::Calc>
=item * L<Date::Format>
lib/Acme/CPANLists/Import/DatesPart1.pm view on Meta::CPAN
=item * L<Date::Piece>
=item * L<Date::Simple>
=item * L<DateTime>
=item * L<DateTime::Format::DateManip>
=item * L<DateTime::Moonpig>
=item * L<DateTimeX::Immutable>
=item * L<Panda::Date>
=item * L<Time::Local>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/CalculatingDayOfWeek.pm view on Meta::CPAN
`Dow` returns 3-letter abbrev.
_
},
{
module => 'DateTime',
bench_code_template => 'DateTime->new(year=><year>, month=><month>, day=><day>)->day_of_week',
description => <<'_',
Compared to <pm:Date::DayOfWeek> and <pm:Time::DayOfWeek>, <pm:DateTime> is a
behemoth. But it provides a bunch of other functionalities as well.
_
},
{
module => 'Date::Calc',
bench_fcall_template => 'Date::Calc::Day_of_Week(<year>, <month>, <day>)',
description => <<'_',
<pm:Date::Calc> is a nice compromise when you want something that is more
lightweight and does not need to be as accurate as <pm:DateTime>.
_
},
{
module => 'Time::Moment',
bench_code_template => 'Time::Moment->new(year => <year>, month => <month>, day => <day>)->day_of_week',
description => <<'_',
<pm:Time::Moment> is also a nice alternative to <pm:DateTime>. Although it's not
as featureful as DateTime, it is significantly more lightweight. Compared to
<pm:Date::Calc>, Time::Moment's API is closer to DateTime's. Being an XS module,
it's also faster.
_
},
],
lib/Acme/CPANModules/CalculatingDayOfWeek.pm view on Meta::CPAN
This module offers cryptic and confusing function names: C<DoW> returns 0-6,
C<Dow> returns 3-letter abbrev.
=item L<DateTime>
Author: L<DROLSKY|https://metacpan.org/author/DROLSKY>
Compared to L<Date::DayOfWeek> and L<Time::DayOfWeek>, L<DateTime> is a
behemoth. But it provides a bunch of other functionalities as well.
=item L<Date::Calc>
Author: L<STBEY|https://metacpan.org/author/STBEY>
L<Date::Calc> is a nice compromise when you want something that is more
lightweight and does not need to be as accurate as L<DateTime>.
=item L<Time::Moment>
Author: L<CHANSEN|https://metacpan.org/author/CHANSEN>
L<Time::Moment> is also a nice alternative to L<DateTime>. Although it's not
as featureful as DateTime, it is significantly more lightweight. Compared to
L<Date::Calc>, Time::Moment's API is closer to DateTime's. Being an XS module,
it's also faster.
=back
lib/Acme/CPANModules/CalculatingDayOfWeek.pm view on Meta::CPAN
L<Date::DayOfWeek> 1.22
L<Time::DayOfWeek> 1.8
L<DateTime> 1.59
L<Date::Calc> 6.4
L<Time::Moment> 0.44
lib/Acme/CPANModules/CalculatingDayOfWeek.pm view on Meta::CPAN
Time::DayOfWeek::DoW(<year>, <month>, <day>)
=item * DateTime (perl_code)
Code template:
DateTime->new(year=><year>, month=><month>, day=><day>)->day_of_week
=item * Date::Calc::Day_of_Week (perl_code)
lib/Acme/CPANModules/CalculatingDayOfWeek.pm view on Meta::CPAN
#table1#
{dataset=>"date1"}
+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
| participant | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples |
+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
| DateTime | 37000 | 27 | 0.00% | 8030.29% | 3.8e-08 | 24 |
| Date::DayOfWeek::dayofweek | 562000 | 1.78 | 1415.39% | 436.51% | 3.8e-10 | 20 |
| Date::Calc::Day_of_Week | 650000 | 1.54 | 1650.85% | 364.36% | 9.3e-10 | 20 |
| Time::DayOfWeek::DoW | 1030000 | 0.97 | 2677.36% | 192.73% | 6.3e-10 | 20 |
| Time::Moment | 3020000 | 0.331 | 8030.29% | 0.00% | 1.7e-10 | 20 |
+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
lib/Acme/CPANModules/CalculatingDayOfWeek.pm view on Meta::CPAN
DC:D_o_W 650000/s 1653% 15% -- -37% -78%
TD:D 1030000/s 2683% 83% 58% -- -65%
T:M 3020000/s 8057% 437% 365% 193% --
Legends:
D: participant=DateTime
DC:D_o_W: participant=Date::Calc::Day_of_Week
DD:d: participant=Date::DayOfWeek::dayofweek
T:M: participant=Time::Moment
TD:D: participant=Time::DayOfWeek::DoW
lib/Acme/CPANModules/CalculatingDayOfWeek.pm view on Meta::CPAN
#table2#
+---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
| participant | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples |
+---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
| DateTime | 145 | 139.2 | 0.00% | 2398.83% | 3.7e-05 | 20 |
| Date::Calc | 24.9 | 19.1 | 483.22% | 328.45% | 1.2e-05 | 21 |
| Time::Moment | 12.2 | 6.4 | 1086.86% | 110.54% | 8.3e-06 | 20 |
| Time::DayOfWeek | 9.8 | 4 | 1380.99% | 68.73% | 5.7e-06 | 20 |
| Date::DayOfWeek | 9.34 | 3.54 | 1453.50% | 60.85% | 5e-06 | 20 |
| perl -e1 (baseline) | 5.8 | 0 | 2398.83% | 0.00% | 6.4e-06 | 20 |
lib/Acme/CPANModules/CalculatingDayOfWeek.pm view on Meta::CPAN
T:D 102.0/s 1379% 154% 24% -- -4% -40%
D:D 107.1/s 1452% 166% 30% 4% -- -37%
perl -e1 (baseline) 172.4/s 2400% 329% 110% 68% 61% --
Legends:
D: mod_overhead_time=139.2 participant=DateTime
D:C: mod_overhead_time=19.1 participant=Date::Calc
D:D: mod_overhead_time=3.54 participant=Date::DayOfWeek
T:D: mod_overhead_time=4 participant=Time::DayOfWeek
T:M: mod_overhead_time=6.4 participant=Time::Moment
perl -e1 (baseline): mod_overhead_time=0 participant=perl -e1 (baseline)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/FormattingDate.pm view on Meta::CPAN
Date formatting modules can be categorized by their expected input format and
the formatting styles.
Input format: Some modules accept date in the form of Unix epoch (an integer),
or a list of integer produced by running the epoch through the builtin gmtime()
or localtime() function. Some others might expect the date as <pm:DateTime>
object. For formatting style: there's strftime in the <pm:POSIX> core module,
and then there's the others.
This list is organized using the latter criteria (formatting style).
lib/Acme/CPANModules/FormattingDate.pm view on Meta::CPAN
same like their counterpart in strftime, but some are different (examples: `i`,
`a`, `M`, and so on). The use of single letter means it's more concise, but the
format becomes unsuitable if you want to put other stuffs (like some string
alphabetical literals) in addition to date components.
In Perl, you can use the <pm:PHP::DateTime> to format dates using PHP `date()`
format.
_
our $LIST = {
lib/Acme/CPANModules/FormattingDate.pm view on Meta::CPAN
Date formatting modules can be categorized by their expected input format and
the formatting styles.
Input format: Some modules accept date in the form of Unix epoch (an integer),
or a list of integer produced by running the epoch through the builtin gmtime()
or localtime() function. Some others might expect the date as L<DateTime>
object. For formatting style: there's strftime in the L<POSIX> core module,
and then there's the others.
This list is organized using the latter criteria (formatting style).
lib/Acme/CPANModules/FormattingDate.pm view on Meta::CPAN
same like their counterpart in strftime, but some are different (examples:>iC<,
>aC<,>M`, and so on). The use of single letter means it's more concise, but the
format becomes unsuitable if you want to put other stuffs (like some string
alphabetical literals) in addition to date components.
In Perl, you can use the L<PHP::DateTime> to format dates using PHP C<date()>
format.
=head1 ACME::CPANMODULES ENTRIES
=over
lib/Acme/CPANModules/FormattingDate.pm view on Meta::CPAN
=item L<Date::Formatter>
Author: L<BIANCHINI|https://metacpan.org/author/BIANCHINI>
=item L<PHP::DateTime>
Author: L<BLUEFEET|https://metacpan.org/author/BLUEFEET>
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Frameworks.pm view on Meta::CPAN
# data-dumping
{module=>'Data::Printer', tags=>['category:data-dumping']},
# date
{module=>'DateTime', tags=>['category:date']},
# distribution-authoring
{module=>'Dist::Zilla', tags=>['category:distribution-authoring']},
{module=>'Minilla', tags=>['category:distribution-authoring']},
{module=>'ShipIt', tags=>['category:distribution-authoring']},
lib/Acme/CPANModules/Frameworks.pm view on Meta::CPAN
=item L<Data::Printer>
Author: L<GARU|https://metacpan.org/author/GARU>
=item L<DateTime>
Author: L<DROLSKY|https://metacpan.org/author/DROLSKY>
=item L<Dist::Zilla>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Import/CPANRatings/User/davidgaramond.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-29'; # DATE
our $DIST = 'Acme-CPANModules-Import-CPANRatings-User-davidgaramond'; # DIST
our $VERSION = '0.002'; # VERSION
our $LIST = {description=>"This list is generated by scraping CPANRatings (cpanratings.perl.org) user page.",entries=>[{description=>"\nOk, it's not 2004 anymore, I suggest we retire or start to deprecate this module? This module now requires Perl 5....
1;
# ABSTRACT: List of modules mentioned by CPANRatings user davidgaramond
__END__
lib/Acme/CPANModules/Import/CPANRatings/User/davidgaramond.pm view on Meta::CPAN
=item L<Data::Rmap>
Author: L<BOWMANBS|https://metacpan.org/author/BOWMANBS>
I was looking for a simple way to transform all DateTime objects in my data structure into string (e.g. "2010-07-06"). After failed experiment with Data::Walk and dumping Data::Transformer due to unsightly interface, I found Data::Rmap. It'...
<br><br>My only complaint would be the name: it's not immediately searchable (I was searching for 'data modify', 'data walk', 'data traverse', 'modify data inplace', and the like). Also, the name "map" suggests that the function will return...
=item L<Data::Walk>
lib/Acme/CPANModules/Import/CPANRatings/User/davidgaramond.pm view on Meta::CPAN
<br>
Rating: 4/10
=item L<DateTime>
Author: L<DROLSKY|https://metacpan.org/author/DROLSKY>
I<THE> definitive date/time handling module in Perl (and even maybe in all major programming languages). Can't believe I went through all the pain of reinventing the wheel, and using various date/time modules of various quality & interface. If on...
<br><br>Look no more, DateTime it is.
<br>
=item L<Data::Rx>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Import/CPANRatings/User/perlancar.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-29'; # DATE
our $DIST = 'Acme-CPANModules-Import-CPANRatings-User-perlancar'; # DIST
our $VERSION = '0.002'; # VERSION
our $LIST = {description=>"This list is generated by scraping CPANRatings (cpanratings.perl.org) user page.",entries=>[{description=>"\nI'm not sure this really "befits a ::Tiny distribution" just because it's a thin wrapper of something. P...
1;
# ABSTRACT: List of modules mentioned by CPANRatings user perlancar
__END__
lib/Acme/CPANModules/Import/CPANRatings/User/perlancar.pm view on Meta::CPAN
Author: L<MZIESCHA|https://metacpan.org/author/MZIESCHA>
Since this is essentially md5(dump($data)), why restrict yourself to hash? This works also for any kind of Perl data structure.
=item L<DateTime::Format::Docker>
Author: L<MZIESCHA|https://metacpan.org/author/MZIESCHA>
Isn't this basically ISO8601 (see DateTime::Format::ISO8601)?
=item L<WWW::CPANRatings>
Author: L<CORNELIUS|https://metacpan.org/author/CORNELIUS>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Import/CPANRatings/User/stevenharyanto.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-29'; # DATE
our $DIST = 'Acme-CPANModules-Import-CPANRatings-User-stevenharyanto'; # DIST
our $VERSION = '0.002'; # VERSION
our $LIST = {description=>"This list is generated by scraping CPANRatings (cpanratings.perl.org) user page.",entries=>[{description=>"\n(REMOVED)\n",module=>"Log::Any",rating=>undef},{description=>"\nProvides a thin/lightweight OO interface for \$?, ...
1;
# ABSTRACT: List of modules mentioned by CPANRatings user stevenharyanto
__END__
lib/Acme/CPANModules/Import/CPANRatings/User/stevenharyanto.pm view on Meta::CPAN
<br>
Rating: 2/10
=item L<DateTime::Format::Flexible>
Author: L<THINC|https://metacpan.org/author/THINC>
While it doesn't cover as much phrases as DateTime::Format::Natural, at least it's simpler to translate (and the dist already includes a couple of translations). BTW, I think like in the POD of DateTime::Format::Natural, it needs to list which phrase...
<br><br>
Rating: 8/10
=item L<DateTime::Format::Natural>
Author: L<SCHUBIGER|https://metacpan.org/author/SCHUBIGER>
I'm giving DateTime::Format::Natural 3 stars because while it's great for English (it covers more phrases than DateTime::Format::Flexible), it's also hard to translate. Look at the source code for DateTime::Format::Natural::Lang::EN: lots of Englishi...
<br>
Rating: 6/10
lib/Acme/CPANModules/Import/CPANRatings/User/stevenharyanto.pm view on Meta::CPAN
Cool, will definitely try this out the next time I write another form processing CGI script. Although the module is named CGI::, there's nothing CGI-specific about it, and that's good. So this module is basically a "path-expander" for hash ...
<br><br>Btw, one thing I use rather often in PHP is naming parameter as "foo[]" which will automatically add elements to the $_REQUEST['foo'] array. Perhaps this feature can be considered too.
=item L<DateTime::BusinessHours>
Author: L<BRICAS|https://metacpan.org/author/BRICAS>
Just tried it. It works, but the module/dist is not in the best shape:
<br><br>* Test fails (pod-coverage, error in POD)
<br><br>* dependency on Class::MethodMaker not yet specified
<br><br>* Documentation: Synopsis contains mistake (class name is DateTime::BusinessHours not BusinessHours), the name '$testing' is not very suitable, there are typos.
<br><br>* Style-wise, method naming is "joinedwords", while in DateTime families it's "separated_words" (not a big deal though).
<br><br>
Rating: 6/10
lib/Acme/CPANModules/Import/CPANRatings/User/stevenharyanto.pm view on Meta::CPAN
<br><br>There's another nice little INI module that can do read/set/delete/unset (instead of just read/dump): Prima::IniFile, but it is included in a totally unrelated distribution.
Rating: 8/10
=item L<DateTime>
Author: L<DROLSKY|https://metacpan.org/author/DROLSKY>
Amidst all the glowing reviews may I add a reminder that, as with everything, there's a catch: runtime performance. On my PC, the speed of creating a DateTime object is just around 6000/sec. If you use DateTime intensively, it can quickly add up.
<br><br>Imagine serving a web page that fetches 50 rows from database, where for convenience you convert each date column to a DateTime object, and you have 120 requests/sec coming in... That's already 6000 objects (an extra second!).
<br><br>Which is unfortunate because DateTime is so wonderful, convenient, correct, complete and all that. So one approach you can use might be to delay converting to DateTime object until necessary.
=item L<Date::Manip>
Author: L<SBECK|https://metacpan.org/author/SBECK>
Wow, there are surely a lot of negative reviews ...
<br><br>First of all, Date::Manip has a long history. I used this module back in 2001-2002, IIRC. Back then it was I<the> swiss army of date/time manipulation, something you use when you want the most flexible/complete thing in Perl. True, it's slow,...
<br><br>But then things change. DateTime project was started, and now it is somewhat the de facto standard. It's more modern and far more modular than the monolithic Date::Manip (every timezone and language support and parsing/formatting modules ship...
<br><br>And then there's the 5.x -> 6.x debacle. As someone who also sprinkle Perl 5.10 requirements to his CPAN modules, I can feel for the author. But the difference is, most of my modules are not that widely used/known, and also many start its ...
<br><br>All in all, you are free to use or not use Date::Manip. There are other alternatives. Pick wisely.
<br>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/NewDistributions/202001.pm view on Meta::CPAN
description => "Distribution Date-strftimeq first released by PERLANCAR at 2020-01-19T01:57:48Z.",
module => "Date::strftimeq",
summary => "POSIX::strftime() with support for embedded perl code in %(...)q",
},
{
description => "Distribution DateTime-Format-Strftimeq first released by PERLANCAR at 2020-01-12T00:05:08Z.",
module => "DateTime::Format::Strftimeq",
summary => "Format DateTime object using DateTimeX::strftimeq",
},
{
description => "Distribution DateTimeX-strftimeq first released by PERLANCAR at 2020-01-05T00:05:58Z.",
module => "DateTimeX::strftimeq",
summary => "POSIX::strftime() with support for embedded perl code in %(...)q",
},
{
description => "Distribution Dist-Zilla-Plugin-Test-ProveDeps first released by PERLANCAR at 2020-01-29T09:03:54Z.",
module => "Dist::Zilla::Plugin::Test::ProveDeps",
lib/Acme/CPANModules/NewDistributions/202001.pm view on Meta::CPAN
=item * L<Date::strftimeq> - POSIX::strftime() with support for embedded perl code in %(...)q
Distribution Date-strftimeq first released by PERLANCAR at 2020-01-19T01:57:48Z.
=item * L<DateTime::Format::Strftimeq> - Format DateTime object using DateTimeX::strftimeq
Distribution DateTime-Format-Strftimeq first released by PERLANCAR at 2020-01-12T00:05:08Z.
=item * L<DateTimeX::strftimeq> - POSIX::strftime() with support for embedded perl code in %(...)q
Distribution DateTimeX-strftimeq first released by PERLANCAR at 2020-01-05T00:05:58Z.
=item * L<Dist::Zilla::Plugin::Test::ProveDeps> - Add release test to run 'prove' on dependent distributions
Distribution Dist-Zilla-Plugin-Test-ProveDeps first released by PERLANCAR at 2020-01-29T09:03:54Z.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Parse/HumanDate.pm view on Meta::CPAN
our $LIST = {
summary => "List of modules that parse human date/time expression",
entries => [
{
module=>'DateTime::Format::Natural',
description => <<'_',
Compared to <pm:DateTime::Format::Flexible>, this module can also parse
duration in addition to date/time, e.g.:
2 years 3 months
And it also can extract the date expression from a longer string.
Speed-wise, I'd say the two modules are roughly comparable. For some patterns
one might be faster than the other.
_
bench_code_template => 'DateTime::Format::Natural->new->parse_datetime(<str>)',
},
{
module=>'DateTime::Format::Flexible',
description => <<'_',
One advantage of this over <pm:DateTime::Format::Natural> is its time zone
support, e.g.:
yesterday 8pm UTC
yesterday 20:00 +0800
yesterday 20:00 Asia/Jakarta
Speed-wise, I'd say the two modules are roughly comparable. For some patterns
one might be faster than the other.
_
bench_code_template => 'DateTime::Format::Flexible->new->parse_datetime(<str>)',
},
{
module => 'Date::Parse',
description => <<'_',
lib/Acme/CPANModules/Parse/HumanDate.pm view on Meta::CPAN
=head1 ACME::CPANMODULES ENTRIES
=over
=item L<DateTime::Format::Natural>
Author: L<SCHUBIGER|https://metacpan.org/author/SCHUBIGER>
Compared to L<DateTime::Format::Flexible>, this module can also parse
duration in addition to date/time, e.g.:
2 years 3 months
And it also can extract the date expression from a longer string.
Speed-wise, I'd say the two modules are roughly comparable. For some patterns
one might be faster than the other.
=item L<DateTime::Format::Flexible>
Author: L<THINC|https://metacpan.org/author/THINC>
One advantage of this over L<DateTime::Format::Natural> is its time zone
support, e.g.:
yesterday 8pm UTC
yesterday 20:00 +0800
yesterday 20:00 Asia/Jakarta
view all matches for this distribution
view release on metacpan or search on metacpan
version=0.004
name=Acme-CPANModules-PortedFrom-Java
[Acme::CPANModules]
module=DateTime::Format::Text
[@Author::PERLANCAR]
:version=0.608
[Prereqs]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/PortedFrom/PHP.pm view on Meta::CPAN
{module=>'Weasel', summary=>'Perl port of Mink'},
{module=>'PHP::Functions::Password'},
{module=>'PHP::Functions::Mail'},
{module=>'PHP::Functions::File'},
{module=>'PHP::Strings'},
{module=>'PHP::DateTime'},
{module=>'PHP::ParseStr'},
{module=>'PHP::HTTPBuildQuery', summary=>'Implement PHP http_build_query() function'},
{module=>'Acme::Addslashes'},
# old
lib/Acme/CPANModules/PortedFrom/PHP.pm view on Meta::CPAN
=item L<PHP::Strings>
Author: L<KUDARASP|https://metacpan.org/author/KUDARASP>
=item L<PHP::DateTime>
Author: L<BLUEFEET|https://metacpan.org/author/BLUEFEET>
=item L<PHP::ParseStr>
view all matches for this distribution