Result:
found more than 670 distributions - search limited to the first 2001 files matching your query ( run in 1.143 )


Data-TDMA

 view release on metacpan or  search on metacpan

lib/Data/TDMA.pm  view on Meta::CPAN

=head1 TDMA in (a whole lot of) Detail

TDMA is the division of a day into multiple epochs, which are further
subdivided into frames, which are then subdivided again, into slots.

The basic formula is thus:

	1 TDMA Day   = 112.5 Epochs
	1 TDMA Epoch = 64 frames
	1 TDMA Frame = 1536 Slots
	1 TDMA Slot  = 0.0078125 seconds (1/128 second)

 view all matches for this distribution


Data-Tabular

 view release on metacpan or  search on metacpan

lib/Data/Tabular/Output/XLS.pm  view on Meta::CPAN

	    }
	}
	for my $cell ($row->cells()) {
	    my ($y, $x) = ($cell->row_id, $cell->col_id);
	    my $data = $cell->data;
	    my $formula = '';
	    my $value = 'asdf';
	    eval {
		if (ref $data) {
		    $worksheet->write($y, $x, $data->string);
		} else {
		    $worksheet->write($y, $x, $data);
		}
	    };
	    if ($@) {
		die "$formula " . $@;
	    }
	}
    }
}

lib/Data/Tabular/Output/XLS.pm  view on Meta::CPAN

	$type = 'text';
	$cell_type = 'averages_right';
    } elsif ($row->type eq 'header') {
    } elsif ($row->type eq 'totals') {
	if (ref($cell_data)) {
	    $type = 'formula';
	    $cell_type = $self->output->type($cell->name);
	}
    } else {
	$type = $self->output->type($cell->name);
    }
next unless $cell_data;
    my $format = undef;

    if (ref($cell_data)) {
# FIXME
	$type = 'formula';
    }

    if ($type eq 'date') {
	if ($cell_data) {
	    $worksheet->write_date_time($y, $x, $cell_data, $formats->{'date'});

lib/Data/Tabular/Output/XLS.pm  view on Meta::CPAN

	$worksheet->write_number($y, $x, $cell_data, $formats->{'dollar'});
    } elsif ($type eq 'number') {
	$worksheet->write_number($y, $x, $cell_data, $formats->{$cell_type});
    } elsif ($type eq 'percent') {
	$worksheet->write_number($y, $x, $cell_data, $formats->{$cell_type});
    } elsif ($type eq 'formula') {
	my $formula = '=';
	if ($cell_data->{type} eq 'sum') {
	    if (!defined $cell_data->{rows}) {
		$formula .= join('+', map({ my $x = $self->_get_col_id($_); chr(0x41+$x) . ($cell->row_id+1); } @{$cell_data->{columns}}));
	    } else {
		$formula .= join('+', map({ chr(0x41+$cell->col_id) . $_; } @{$cell_data->{rows}}));
	    }
	} elsif ($cell_data->{type} eq 'average' || $cell_data->{type} eq 'avg') {
	    $formula .= '(';
	    if (!defined $cell_data->{rows}) {
		$formula .= join('+', map({ my $x = $self->_get_col_id($_); chr(0x41+$x) . ($cell->row_id+1); } @{$cell_data->{columns}}));
	    } else {
		$formula .= join('+', map({ chr(0x41+$cell->col_id) . $_; } @{$cell_data->{rows}}));
	    }
	    $formula .= ')';
	    $formula .= "/" . scalar(@{$cell_data->{rows} || $cell_data->{columns}});
	} else {
	    warn $cell_data->{type};
	}

	$formula = '';
	$formula .= '';
	my $value = $cell_data->{html};

 view all matches for this distribution


Data-Type

 view release on metacpan or  search on metacpan

lib/Data/Type/Facet.pm  view on Meta::CPAN


	sub info : method
	{
		my $this = shift;

		return 'LUHN formula (mod 10) for validation of creditcards';
	}

  # To be implemented and not yet really usefull yet.
  # 

 view all matches for this distribution


Data-URIID

 view release on metacpan or  search on metacpan

lib/Data/URIID/Service.pm  view on Meta::CPAN

                application/vnd.debian.binary-package
                application/vnd.sirtx.vmv0
                application/vnd.oasis.opendocument.base
                application/vnd.oasis.opendocument.chart
                application/vnd.oasis.opendocument.chart-template
                application/vnd.oasis.opendocument.formula
                application/vnd.oasis.opendocument.formula-template
                application/vnd.oasis.opendocument.graphics
                application/vnd.oasis.opendocument.graphics-template
                application/vnd.oasis.opendocument.image
                application/vnd.oasis.opendocument.image-template
                application/vnd.oasis.opendocument.presentation

 view all matches for this distribution


Data-Variant

 view release on metacpan or  search on metacpan

INSTALL  view on Meta::CPAN

Installation
------------

The installation is trivial and follows the usual formula for installation:

perl Makefile.PL
make
make test
make install  

 view all matches for this distribution


DataCube

 view release on metacpan or  search on metacpan

t/vg  view on Meta::CPAN

playstation 2^ford racing 3^empire interactive^razorworks^racing, driving^2^e (everyone)^03/22/2005
playstation 2^ford racing off road^xplosiv^razorworks^racing, driving^2^e (everyone)^03/14/2008
playstation 2^ford vs. chevy^global star software^eutechnyx^racing, driving^6^e (everyone)^11/08/2005
playstation 2^forever kingdom^agetec^from software^role-playing game^1^t (teen)^01/22/2002
playstation 2^forgotten realms: demon stone^atari^stormfront studios^third-person action, adventure, role-playing game^1^t (teen)^09/14/2004
playstation 2^formula challenge^oxygen interactive^aqua pacific^racing, driving^2^rp (rating pending)^08/06/2004
playstation 2^formula one 04^sony computer entertainment europe^sony computer entertainment europe^racing, driving^4^rp (rating pending)^07/30/2004
playstation 2^formula one 05^sony computer entertainment europe^sony computer entertainment europe^racing, driving^8^rp (rating pending)^07/01/2005
playstation 2^formula one 06^sony computer entertainment^sce studios liverpool^racing, driving^2^rp (rating pending)^07/28/2006
playstation 2^formula one 2001^sony computer entertainment^studio liverpool^racing, sports, simulation^2^e (everyone)^10/02/2001
playstation 2^formula one 2002^sony computer entertainment europe^studio liverpool^racing, driving^2^rp (rating pending)^11/01/2002
playstation 2^four horsemen of the apocalypse^3do^3do^third-person action, adventure^1^m (mature)^02/14/2004
playstation 2^freak out: extreme freeride^jowood productions^coldwood interactive^extreme sports, skiing^2^rp (rating pending)^03/30/2007
playstation 2^freaky flyers^midway^midway^action, racing^2^t (teen)^08/04/2003
playstation 2^free running^reef entertainment^core design - rebellion^action, extreme sports^1^rp (rating pending)^04/20/2007
playstation 2^freedom fighters^electronic arts^io interactive^third-person action, turn-based strategy^4^t (teen)^10/01/2003

t/vg  view on Meta::CPAN

playstation 3^fight night round 4^electronic arts^ea canada^boxing, sports^2^rp (rating pending)^03/01/2009
playstation 3^final fantasy versus xiii^square enix^square enix^action, role-playing game^1^rp (rating pending)^12/01/2008
playstation 3^final fantasy xiii^square enix^square enix^role-playing game^1^rp (rating pending)^12/01/2008
playstation 3^flow^sony computer entertainment america^thatgamecompany^action^4^e (everyone)^02/22/2007
playstation 3^folklore^sony computer entertainment america^game republic^adventure^1^t (teen)^10/09/2007
playstation 3^formula one championship edition^sony computer entertainment^sce studios liverpool^racing, driving^10^e (everyone)^02/27/2007
playstation 3^fracture^lucasarts^day 1 studios^third-person shooter, action^multi^rp (rating pending)^10/07/2008
playstation 3^full auto 2: battlelines^sega^pseudo interactive^racing, action, car combat^8^t (teen)^12/07/2006
playstation 3^gauntlet ii^sony online entertainment^backbone entertainment^action, arcade^4^e (everyone)^05/03/2007
playstation 3^genji: days of the blade^sony computer entertainment america^game republic - scej^third-person action, adventure^1^t (teen)^11/17/2006
playstation 3^ghostbusters: the video game^sierra entertainment^terminal reality^action^multi^rp (rating pending)^10/07/2008

t/vg  view on Meta::CPAN

playstation portable^ape escape academy^sony computer entertainment^sony computer entertainment japan^party^4^e10+ (everyone 10 and older)^01/17/2006
playstation portable^ape escape academy 2^sony computer entertainment^shift^party^4^rp (rating pending)^09/29/2006
playstation portable^ape escape: on the loose^sony computer entertainment america^sony computer entertainment america^action, platform^4^e (everyone)^03/17/2005
playstation portable^ape quest^sony computer entertainment america^sce studios japan^role-playing game^1^e (everyone)^01/10/2008
playstation portable^archer maclean's mercury^ignition entertainment^awesome studios^puzzle^2^e (everyone)^04/06/2005
playstation portable^armored core: formula front^agetec inc.^from software^mech fighting, action, shooter^2^t (teen)^12/15/2005
playstation portable^arthur and the invisibles^atari^estranges libellule^action, adventure^2^e (everyone)^02/16/2007
playstation portable^asphalt: urban gt 2^ubisoft^virtuous - game source^racing, driving^4^rp (rating pending)^05/03/2007
playstation portable^astonishia story^ubisoft / sonnori corporation^sonnori corporation^role-playing game^1^e10+ (everyone 10 and older)^06/06/2006
playstation portable^atari classics evolved^atari^stainless games^arcade, compilation^2^e (everyone)^12/19/2007
playstation portable^atv offroad fury pro^sony computer entertainment america^climax studios^racing^4^e (everyone)^10/26/2006

t/vg  view on Meta::CPAN

playstation portable^football manager handheld^sega europe^sports interactive^sports management simulation^1^rp (rating pending)^04/13/2006
playstation portable^football manager handheld 2007^sega europe^sports interactive^sports management simulation^1^e (everyone)^12/01/2006
playstation portable^football manager handheld 2008^sega europe^sports interactive^sports management simulation^1^e (everyone)^11/30/2007
playstation portable^ford bold moves street racing^eidos interactive^razorworks^racing, driving^2^e (everyone)^10/17/2006
playstation portable^ford racing off road^xplosiv^razorworks^racing, driving^6^e (everyone)^03/14/2008
playstation portable^formula 1: grand prix^sony computer entertainment europe^traveller's tales^racing, driving^8^rp (rating pending)^08/12/2005
playstation portable^formula one 06^sony computer entertainment^sce studios liverpool^racing, driving^2^rp (rating pending)^09/21/2006
playstation portable^frantix^sony online entertainment^killer game^puzzle^1^e (everyone)^09/19/2005
playstation portable^freak out: extreme ride^jowood productions^coldwood interactive^extreme sports^1^rp (rating pending)^10/26/2007
playstation portable^free running^reef entertainment^core design - rebellion^extreme sports^1^t (teen)^04/20/2007
playstation portable^frogger: helmet chaos^konami^kce hawaii^platform^4^e (everyone)^09/29/2005
playstation portable^from russia with love^electronic arts^ea redwood shores^first-person shooter, action^6^t (teen)^04/03/2006

 view all matches for this distribution


Date-Calc-XS

 view release on metacpan or  search on metacpan

CHANGES.txt  view on Meta::CPAN


 +  Added compiler directives for C++.
 +  Removed "Carp::Clan" from the distribution (available separately).
 +  Fixed bug in initialization of "Date::Calendar::Year" objects.
 +  Added method "tags()" to "Date::Calendar" and "Date::Calendar::Year".
 +  Fixed the formula for "Labor Day" in the U.S. to "1/Mon/Sep".
 +  Added a new recipe to the "Date::Calc" documentation.
 +  Added Romanian to the list of languages supported by "Date::Calc".
 +  Changed the example script "calendar.cgi" to highlight the name
    which led to a given date being a holiday.
 +  Fixed the Polish entries in "Date::Calc".

 view all matches for this distribution


Date-Calc

 view release on metacpan or  search on metacpan

lib/Date/Calendar/Profiles.pm  view on Meta::CPAN

{
    my($year,$label) = @_;
    return( &Next_Monday($year,1,1) );
}
#
# The following formula (also from Jonathan Stowe <gellyfish@gellyfish.com>)
# also contradicts my pocket calendar, but for lack of a better guess I
# left it as it is. Please tell me the correct formula in case this one
# is wrong! Thank you!
#
sub GB_Early_May # May bank holiday is the first Monday after May 1st
{
    my($year,$label) = @_;

lib/Date/Calendar/Profiles.pm  view on Meta::CPAN

    %{$Profiles->{'AU'}},
    "New Year's Day"            => "01.01.",
    "Regatta Day"               => "2/Tue/Feb",
    "Lauceston Cup Day"         => \&AU_Lauceston,
    "King Island Show Day"      => "1/Tue/Mar", # uncertain! (maybe Tuesday after 1/Sun/Mar?)
    "Eight Hour Day"            => "2/Mon/Mar", # dubious, formula probably wrong!
    "Easter Saturday"           => "-1",
    "Queen's Birthday"          => "2/Mon/Jun",
    "Recreation Day"            => "1/Mon/Nov"  # only North Tasmania - date not confirmed!
};
$Profiles->{'AU-SA'} =  # South Australia

lib/Date/Calendar/Profiles.pm  view on Meta::CPAN

};
$Profiles->{'AU-ACT'} = # Australian Capital Territory
{
    %{$Profiles->{'AU'}},
    "New Year's Day"            => "01.01.",
    "Canberra Day"              => "2/Mon/Mar", # dubious, formula probably wrong!
    "Easter Saturday"           => "-1",
    "Queen's Birthday"          => "2/Mon/Jun",
    "Labour Day"                => "1/Mon/Oct"
};
$Profiles->{'AU-NSW'} = # New South Wales

 view all matches for this distribution


Date-Convert-French_Rev

 view release on metacpan or  search on metacpan

eg/g2r_table  view on Meta::CPAN

      $end_of_interval{$current_start} = $year;
  }
}

#
# Compute the formulas for a sample year and for a month.
# 1st January 1796 is 11 Nivôse IV, and 31 January 1796 is 11 Pluviôse IV.
# Therefore, for January 1796, we have two formulas : "+10 Niv" and "-20 Plu".
# Since all French Revolutionary months have 30 days, only one computation is necessary.
# Exception: the additional days are grouped in a notional 13th month, which lasts
# either 5 or 6 days. In this case, we have 3 formulas for September, at the cost of 2 conversions.
#
sub formulas {
  my ($year, $month) = @_;
  my @formulas = ();
  my @month = qw(Niv Plu Vnt Ger Flo Pra Mes The Fru S-C Vnd Bru Fri Niv);
  my $date = Date::Convert::Gregorian->new($year, $month, 1);
  Date::Convert::French_Rev->convert($date);
  my $offset = $date->day() - 1;
  if ($month <= 9) # Have to split in two, because of the additional days within @month
    {
      push @formulas, "+$offset $month[$month - 1]";
      $offset = 30 - $offset;
      push @formulas, "-$offset $month[$month]";
    }
  else
    {
      push @formulas, "+$offset $month[$month]";
      $offset = 30 - $offset;
      push @formulas, "-$offset $month[$month + 1]";
    }
  if ($month == 9)
    {
      $date  = Date::Convert::French_Rev->new($year - 1791, 1, 1);
      Date::Convert::Gregorian->convert($date);
      $offset = $date->day() - 1;
      push @formulas, "-$offset Vnd";
    }

  @formulas;
}

sub html_0 {
  my ($title) = @_;
  print <<"EOF";

eg/g2r_table  view on Meta::CPAN

    {
      print "<tr align='center'><td>$labels{month}[8]</td>";
      foreach (@days)
        {
          my $year = $year_of_partday{$part}{$_};
          my @formulas = formulas($year, 9);
          print "<td>$formulas[2]</td>\n";
        }
      print "</tr>\n";
    }
  # The regular months of the part of the year
  my @month_list = $part eq 'b' ? (1..2) : $part eq 'm' ? (3..9) : (10..12);

eg/g2r_table  view on Meta::CPAN

    {
      print "<tr align='center'><td>$labels{month}[$month - 1]</td>";
      foreach (@days)
        {
          my $year = $year_of_partday{$part}{$_};
          my @formulas = formulas($year, $month);
          print "<td>$formulas[0]<br />$formulas[1]</td>\n";
        }
      print "</tr>\n";
    }

  print "</table>\n";

eg/g2r_table  view on Meta::CPAN

  my $y2       = sprintf "%02d", $y % 100;
  my $part     = $m <= 2 ? 'b' : $m < 9 ? 'm' : 'e';
  my $offset   = $part eq 'e' ? 1791 : 1792;
  my $letter   = letter_of_yearpart($y, $part);
  my $word     = word_for_year($y);
  my @formulas = formulas($y, $m);
  my $limit    = $1 if $formulas[1] =~ /(\d+)/;
  my $formula  = $formulas[$d <= $limit ? 0 : 1];
  my $ryear    = $date->year();
  my $begint; # Beginning of the interval
  foreach (sort { $a <=> $b } keys %end_of_interval)
    {
      last if $y < $_;

eg/g2r_table  view on Meta::CPAN

  # Second example: September
  # $m = 9;
  $gr_date  = &{$labels{format}}($y, 9, $d, $lang);
  $date = Date::Convert::Gregorian->new($y, 9, $d);
  Date::Convert::French_Rev->convert($date);
  @formulas   = formulas($y, 9);
  my $mletter = letter_of_yearpart($y, 'm');
  my $eletter = letter_of_yearpart($y, 'e');
  $abridged   = $date->date_string("%e %b %Y");
  $rev_date   = $date->date_string("%A %e %B %EY");
  $limit = $1 if $formulas[1] =~ /(\d+)/;
  if ($d <= $limit)
    { $formula = $formulas[0]; $offset = 1792 }
  else
    {
      $limit = $1 if $formulas[2] =~ /(\d+)/;
      if ($d <= $limit)
        { $formula = $formulas[1]; $offset = 1792 }
      else
        { $formula = $formulas[2]; $offset = 1791 }
    }
  $_ = eval "qq($labels{usage2})";
  print;
}

 view all matches for this distribution


Date-Day

 view release on metacpan or  search on metacpan

Day.pm  view on Meta::CPAN

March 45, 2001 will return a day, just one with no meaning. So make sure 
you pass real dates.

After initial release of this module, I decided to elaborate on the 
mathematical foundations for the algorithm used. Most other day of week 
modules use the dooms day algorithm. Date::Day uses a single line formula.

Not getting into too much detail, we take the fact that March 1, 0000 fell 
on a Wednesday. Knowing this, we can determine the day of week March 1 
will fall on in any given year y > 0. That is:

Day.pm  view on Meta::CPAN

So we refine our table:

Month   1 2 3 4 5 6 7 8 9 10 11 12
Value   0 3 2 5 0 3 5 1 4 6  2  4

The above table is very important in our final formula. So for example, 
the month June is numerical 6, and 6 goes to value 3. 3 is then used in 
our final formula.

With all the above data, it follows that month m, day 1, year y, has day 
of week number:

	1 + j(m) + y + [y/4] - [y/100] + [y/400] mod 7

And to get a formula that handles any given day, we use the formula:

	d + j(m) + y + [y/4] - [y/100] + [y/400] mod 7       (***)

So for example, we want to find the day of week corresponding to April 8, 
2002. If March is month 1, then April is month 2, hence m=2. So j(2)=5. 

Day.pm  view on Meta::CPAN


	which is, 1 mod 7. So 4/8/2002 is a Monday.

So when you look at the code portion of Day.pm you see only two important 
lines of code. One line is for the associative array that implements j(m). 
The other line is for implementing formula (***). Thats it.

=head1 AUTHOR

John Von Essen, john@essenz.com

 view all matches for this distribution


Date-Easy

 view release on metacpan or  search on metacpan

t/units.t  view on Meta::CPAN

		throws_ok { $d - $multiple } qr/cannot call/, "date subtraction of $_ fails";
	}
}


# test prototypes and also try a few more complex formulae
my $dt = datetime("Jan-02-2003 04:05:06");
my $dt2;
lives_ok { $dt2 = $dt + 2*days + 5*hours - 8*years + 10*seconds - 3*minutes } "complex example parses correctly";
is $dt2->strftime($FMT), "1995/01/04 09:02:16", "complex example (including prototypes) works";

 view all matches for this distribution


Date-Gregorian

 view release on metacpan or  search on metacpan

t/01_basics.t  view on Meta::CPAN

test 216, $date == $date2;

$date2 = $date->set_weekday(SUNDAY, '<=');
test 217, $date == $date2;

# --- easter formula, border cases ---

test_ymd(218, $date->set_easter(2011), 2011, 4, 24);
test_ymd(219, $date->set_easter(2038), 2038, 4, 25);
test_ymd(220, $date->set_easter(2049), 2049, 4, 18);
test_ymd(221, $date->set_easter(2076), 2076, 4, 19);

 view all matches for this distribution


Date-Holidays-TW

 view release on metacpan or  search on metacpan

lib/Date/Holidays/TW.pm  view on Meta::CPAN

    my $lunar_mmdd = sprintf('%02d%02d', $lunar_date->month, $lunar_date->day);
    return $FOLK_LUNAR{$lunar_mmdd};
}

sub __is_qingming {
    # Thanks Wei-Hon Chen for the formula.
    my $dt = $_[0];
    return undef unless $dt->month == 4 && 3 < $dt->day && $dt->day < 6;
    my $year = $dt->year;
    die "Unsupported" if $year < 1901 || 2100 < $year;
    my $Y = ($year % 100);

 view all matches for this distribution


Date-Indiction

 view release on metacpan or  search on metacpan

lib/Date/Indiction.pm  view on Meta::CPAN


Indiction (called I<indict> in Russian chronicles) is the number of
the year in a 15-year cycle, starting from September 1, 312 AD. It can
be calculated for either Byzantine year (Anno Mundi, AM, old Russian
style with the epoch on March 1, 5508 BCE) or Christian year (Anno
Domini, AD). The formulae are, respectively,

    I = AM % 15

    I = (AD + 3) % 15

 view all matches for this distribution


Date-Pcalc

 view release on metacpan or  search on metacpan

lib/Date/Pcalendar/Profiles.pm  view on Meta::CPAN

{
    my($year,$label) = @_;
    return( &Next_Monday($year,1,1) );
}
#
# The following formula (also from Jonathan Stowe <gellyfish@gellyfish.com>)
# also contradicts my pocket calendar, but for lack of a better guess I
# left it as it is. Please tell me the correct formula in case this one
# is wrong! Thank you!
#
sub GB_Early_May # May bank holiday is the first Monday after May 1st
{
    my($year,$label) = @_;

lib/Date/Pcalendar/Profiles.pm  view on Meta::CPAN

    %{$Profiles->{'AU'}},
    "New Year's Day"            => "01.01.",
    "Regatta Day"               => "2/Tue/Feb",
    "Lauceston Cup Day"         => \&AU_Lauceston,
    "King Island Show Day"      => "1/Tue/Mar", # uncertain! (maybe Tuesday after 1/Sun/Mar?)
    "Eight Hour Day"            => "2/Mon/Mar", # dubious, formula probably wrong!
    "Easter Saturday"           => "-1",
    "Queen's Birthday"          => "2/Mon/Jun",
    "Recreation Day"            => "1/Mon/Nov"  # only North Tasmania - date not confirmed!
};
$Profiles->{'AU-SA'} =  # South Australia

lib/Date/Pcalendar/Profiles.pm  view on Meta::CPAN

};
$Profiles->{'AU-ACT'} = # Australian Capital Territory
{
    %{$Profiles->{'AU'}},
    "New Year's Day"            => "01.01.",
    "Canberra Day"              => "2/Mon/Mar", # dubious, formula probably wrong!
    "Easter Saturday"           => "-1",
    "Queen's Birthday"          => "2/Mon/Jun",
    "Labour Day"                => "1/Mon/Oct"
};
$Profiles->{'AU-NSW'} = # New South Wales

 view all matches for this distribution


Date-Pregnancy

 view release on metacpan or  search on metacpan

lib/Date/Pregnancy.pm  view on Meta::CPAN

=back

=head1 DISCLAIMER

The method of calculating day of birth and week numbers implemented in
this module is based on simple formulas.

The ultrasound scan is a much more accurate method and finally babies
seem to have a will of their own, so please do only use the results of
this module as a guideline, the author of this module cannot be held
responsible for the results of calculations based on use of this module.

 view all matches for this distribution


Date-Roman

 view release on metacpan or  search on metacpan

lib/Date/Roman.pm  view on Meta::CPAN

value of the B<num> parameter below if given, to B<Roman> otherwise.


=item B<auc>

Controls how the "ab Urbe condita" formula is written. Possible values
are: B<abbrev>, which writes it as "AUC", and B<complete> which writes
it in full. This parameter defaults to the value of the B<words>
parameter below if given, and to B<abbrev> otherwise.


lib/Date/Roman.pm  view on Meta::CPAN

used an inclusive counting. That way, for instance,
the 2 Jan was the 4th day before the nones of January (the nones of
January being the 5th of January).

The day before a fixed day was designed by "pridie", abbreviated as
"p.d.". The other days was designed using the formula "ante diem",
abbreviated as "a.d.". For instance, the 16th of April was 
I<ante diem XVI Kalendas Maias>, abbreviated as I<a.d. Kal. Mai.>

In leap years, the supplemental day was obtained by counting two times
the 6th day before the Kalendae of March.

 view all matches for this distribution


Date-SundayLetter

 view release on metacpan or  search on metacpan

lib/Date/SundayLetter.pm  view on Meta::CPAN

 Thursday       4 January       D
 Friday         3 January       C
 Saturday       2 January       B

In leap years, you have two Sunday Letters. After leap day, you have a
Sunday Letter calculated with the usual formulae. Before leap day, the
Sunday Letter is one place ahead of that (with A being considered one
latter after G).

Given the Sunday Letter and the Golden Number (see
Date::GoldenNumber), you can immediately look up the dates for Easter

 view all matches for this distribution


Date-Vruceleto

 view release on metacpan or  search on metacpan

lib/Date/Vruceleto.pm  view on Meta::CPAN

chronology as "solar cycle". The count of solar cycles in this
calendar system starts from March 1, 5508 BCE (called Constantinople
World Aera).

I.A.Klimishin in his book "Calendar and Chronology" (Moscow, Nauka,
1985, pp. 66-70) gives the following formulae to calculate solar
cycles and vruceletos ([] meaning the integer part of the quotient and
|| the remainder):

- First get the solar cycle (Q) of the year of Constantinople aera (B):

 view all matches for this distribution


DateTime-Calendar-FrenchRevolutionary

 view release on metacpan or  search on metacpan

eg/g2r_table  view on Meta::CPAN

      $end_of_interval{$current_start} = $year;
  }
}

#
# Compute the formulas for a sample year and for a month.
# 1st January 1796 is 11 Nivôse IV, and 31 January 1796 is 11 Pluviôse IV.
# Therefore, for January 1796, we have two formulas : "+10 Niv" and "-20 Plu".
# Since all French Revolutionary months have 30 days, only one computation is necessary.
# Exception: the additional days are grouped in a notional 13th month, which lasts
# either 5 or 6 days. In this case, we have 3 formulas for September, at the cost of 2 conversions.
#
sub formulas {
  my ($year, $month) = @_;
  my @formulas = ();
  my @month = qw(Niv Plu Vnt Ger Flo Pra Mes The Fru S-C Vnd Bru Fri Niv);
  #my $date = new Date::Convert::Gregorian $year, $month, 1;
  #convert Date::Convert::FrenchRevolutionary $date;
  my $dg = DateTime->new(year => $year, month => $month);
  my $dr = DateTime::Calendar::FrenchRevolutionary->from_object(object => $dg);
  my $offset = $dr->day() - 1;
  if ($month <= 9) # Have to split in two, because of the additional days within @month
    {
      push @formulas, "+$offset $month[$month - 1]";
      $offset = 30 - $offset;
      push @formulas, "-$offset $month[$month]";
    }
  else
    {
      push @formulas, "+$offset $month[$month]";
      $offset = 30 - $offset;
      push @formulas, "-$offset $month[$month + 1]";
    }
  if ($month == 9)
    {
      #$date  = new Date::Convert::FrenchRevolutionary $year - 1791, 1, 1;
      #convert Date::Convert::Gregorian $date;
      $dr = DateTime::Calendar::FrenchRevolutionary->new(year => $year - 1791);
      $dg = DateTime->from_object(object => $dr);
      $offset = $dg->day() - 1;
      push @formulas, "-$offset Vnd";
    }

  @formulas;
}

sub html_0 {
  my ($title) = @_;
  print <<"EOF";

eg/g2r_table  view on Meta::CPAN

  # the part of September in the end of the year
  if ($part eq 'e') {
    print "<tr align='center'><td>$labels{month}[8]</td>";
    foreach (@days) {
      my $year = $year_of_partday{$part}{$_};
      my @formulas = formulas($year, 9);
      print "<td>$formulas[2]</td>\n";
    }
    print "</tr>\n";
  }
  # The regular months of the part of the year
  my @month_list = $part eq 'b' ? (1..2) : $part eq 'm' ? (3..9) : (10..12);
  foreach my $month (@month_list) {
    print "<tr align='center'><td>$labels{month}[$month - 1]</td>";
    foreach (@days) {
      my $year = $year_of_partday{$part}{$_};
      my @formulas = formulas($year, $month);
      print "<td>$formulas[0]<br>$formulas[1]</td>\n";
    }
    print "</tr>\n";
  }

  print "</table>\n";

eg/g2r_table  view on Meta::CPAN

  my $y2       = sprintf "%02d", $y % 100;
  my $part     = $m <= 2 ? 'b' : $m < 9 ? 'm' : 'e';
  my $offset   = $part eq 'e' ? 1791 : 1792;
  my $letter   = letter_of_yearpart($y, $part);
  my $word     = word_for_year($y);
  my @formulas = formulas($y, $m);
  my $limit    = $1 if $formulas[1] =~ /(\d+)/;
  my $formula  = $formulas[$d <= $limit ? 0 : 1];
  my $ryear    = $date->year();
  my $begint; # Beginning of the interval
  foreach (sort { $a <=> $b } keys %end_of_interval)
    {
      last if $y < $_;

eg/g2r_table  view on Meta::CPAN

  # $m = 9;
  $gr_date  = &{$labels{format}}($y, 9, $d, $lang);
  #$date = new Date::Convert::Gregorian $y, 9, $d;
  #convert Date::Convert::FrenchRevolutionary $date;
  $date = DateTime::Calendar::FrenchRevolutionary->from_object(object => DateTime->new(year => $y, month => 9, day => $d));
  @formulas   = formulas($y, 9);
  my $mletter = letter_of_yearpart($y, 'm');
  my $eletter = letter_of_yearpart($y, 'e');
  $abridged   = $date->strftime("%e %b %Y");
  $rev_date   = $date->strftime("%A %e %B %EY");
  $limit = $1 if $formulas[1] =~ /(\d+)/;
  if ($d <= $limit)
    { $formula = $formulas[0]; $offset = 1792 }
  else
    {
      $limit = $1 if $formulas[2] =~ /(\d+)/;
      if ($d <= $limit)
        { $formula = $formulas[1]; $offset = 1792 }
      else
        { $formula = $formulas[2]; $offset = 1791 }
    }
  $_ = eval "qq($labels{usage2})";
  print;
}

 view all matches for this distribution


DateTime-Event-Easter

 view release on metacpan or  search on metacpan

lib/DateTime/Event/Easter.pm  view on Meta::CPAN

=item * western_epact($year)

In the  Gregorian comput, the epact  is the age of  the ecclesiastical
Moon on the 1st January of the  given year. The C<western> part of the
subroutine  name  accounts for  the  fact  that Gregorian  and  Julian
calendars do not use the same formula.

The epact  is a 0..29 number.  The "0" value  is shown as "*"  in some
sources. This  subroutine does not convert  "0" to "*", the  result is
always a pure number.

lib/DateTime/Event/Easter.pm  view on Meta::CPAN

=item * eastern_epact($year)

In the Julian comput, the epact  is the age of the ecclesiastical Moon
on 22nd March. The C<eastern> part of the subroutine name accounts for
the  fact that  Gregorian and  Julian calendars  do not  use the  same
formula.

The epact  is a 0..29 number.  The "0" value  is shown as "*"  in some
sources. This  subroutine does not convert  "0" to "*", the  result is
always a pure  number. There is no  other special case, for  25 as for
any other number.

The formula given by Reingold and  Dershowitz is a "shifted epact" and
gives  different  results from  the  values  printed in  Lefort's  and
Couderc's books. The module follows Couderc and Lefort.

=item * western_sunday_letter($year), eastern_sunday_letter($year)

 view all matches for this distribution


DateTime-Event-Jewish

 view release on metacpan or  search on metacpan

lib/DateTime/Event/Jewish/Haversine.pm  view on Meta::CPAN

@EXPORT_OK = qw(recalculate_coordinate azimuth elevation point2distance);
use Math::Trig;
our $VERSION = '0.01';


#  Python implementation of Haversine formula
#  Copyright (C) <2009>  Bartek Garny <bartek at gorny.edu.pl>
#  Converted to Perl by Raphael Mankin <rapmankin at cpan.org> Feb 2010
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by

lib/DateTime/Event/Jewish/Haversine.pm  view on Meta::CPAN

#  Sun: 31.6' - 32.7'
#  Moon: 29.3' - 34.1'

=head1 NAME

Haversine.pm - Calculations using haversine formula

=head1 SYNOPSIS

  use Haversine;
  my $degrees	= recalculate_coordinate([51, 12, 0], 'deg');

lib/DateTime/Event/Jewish/Haversine.pm  view on Meta::CPAN

      

=head3 points2distance($start, $end)

Calculate distance (in kilometers) between two points
given as (lat, long) pairs based on Haversine formula
(http://en.wikipedia.org/wiki/Haversine_formula).
Implementation inspired by JavaScript implementation from http://www.movable-type.co.uk/scripts/latlong.html

Accepts coordinates as tuples (deg, min, sec), but coordinates can be given in any form - e.g.
can specify only minutes:
(0, 3133.9333, 0) 

lib/DateTime/Event/Jewish/Haversine.pm  view on Meta::CPAN

}

=head3 azimuth($start, $end)

Calculate azimuth (bearing) of one point from another
given as (lat, long) pairs based on Haversine formula

=cut

sub azimuth {
    my ($start, $end)	= @_;

 view all matches for this distribution


DateTime-Event-Random

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.03     2004-03-17
0.02_02  2004-03-15
- update to new DateTime::Set specs
- more tests, revised README and TODO
- added a note on README about tests that may fail.
- use a slightly different density formula 
  for calculating the first element of a set.
  This should give a better distribution for 
  $set->next($dt) on an unbounded, uncached set -
  but only the first time it is called (this is 
  still in the TODO list)

 view all matches for this distribution


DateTime-Lite

 view release on metacpan or  search on metacpan

lib/DateTime/Lite.pm  view on Meta::CPAN

}

sub week_number { ( $_[0]->week )[1] }

# ISO: first week of the month is the first week containing a Thursday.
# Direct formula - no clone, no add(), no recursion.
# NOTE: week_of_month is autoloaded

sub week_year { ( $_[0]->week )[0] }

# NOTE: weekday_of_month is autoloaded

 view all matches for this distribution


DateTime-Locale

 view release on metacpan or  search on metacpan

lib/DateTime/Locale/Data.pm  view on Meta::CPAN

  "1694ACAD" => "Early Modern French",
  1901 => "Traditional German orthography",
  "1959ACAD" => "Academic",
  1994 => "Standardized Resian orthography",
  1996 => "German orthography of 1996",
  ABL1943 => "Orthographic formulation of 1943",
  ALALC97 => "ALA-LC Romanization, 1997 edition",
  ALUKU => "Aluku dialect",
  AO1990 => "Portuguese Language Orthographic Agreement of 1990",
  AREVELA => "Eastern Armenian",
  AREVMDA => "Western Armenian",

 view all matches for this distribution


DateTime-Util-Calc

 view release on metacpan or  search on metacpan

lib/DateTime/Util/Calc.pm  view on Meta::CPAN

iteration.

=head2 search_next(%opts)

Performs a "linear" search until some condition is met. This is a generalized
version of the formula defined in [1] p.22. The basic idea is :

  x = base
  while (! check(x) ) {
     x = next(x);
  }

 view all matches for this distribution


DateTime

 view release on metacpan or  search on metacpan

lib/DateTime.pm  view on Meta::CPAN

free from DST-related complications.

=item * $dt->subtract_datetime and $dt->add_duration

You must convert your datetime objects to the UTC time zone before doing date
math if you want to make sure that the following formulas are always true:

    $dt2 - $dt1 = $dur
    $dt1 + $dur = $dt2
    $dt2 - $dur = $dt1

Note that using C<< $dt->delta_days >> ensures that this formula always works,
regardless of the time zones of the objects involved, as does using C<<
$dt->subtract_datetime_absolute >>. Other methods of subtraction are not always
reversible.

=item * never do math on two objects where only one is in the floating time zone

 view all matches for this distribution


DayOfNthWeek

 view release on metacpan or  search on metacpan

DayOfNthWeek.pm  view on Meta::CPAN

sub tomorrow { print "Meeting is tomorrow\n";  }
sub tonight  { print "Meeting is tonight\n";   }

=head2 FORMULA

The formula for calculating the week is:

(int(((Day of the Month - 1)+ Day of the Week)/7))+1


	my %hash = ();

 view all matches for this distribution


Deco

 view release on metacpan or  search on metacpan

lib/Deco/Tissue.pm  view on Meta::CPAN

    $self->{time}->{lastdepthchange} = 0;

    # oxygen exposure tracking through OTU's
    $self->{otu}   = 0;

    # haldane formula for current parameters, returns a ref to a sub
    $self->{haldane} = $self->_haldanePressure();

    return $self;
}

lib/Deco/Tissue.pm  view on Meta::CPAN

	
	# remember this depthchange on the time scale
	$self->{time}->{lastdepthchange} = $self->{time}->{current};
	#print "Time of last depth change is: " . $self->{time}->{lastdepthchange} ."\n";

	# when depth changes we need to recalculate the Haldane formula
	$self->{haldane} = $self->_haldanePressure();
    }

    return $self->{depth};
}

lib/Deco/Tissue.pm  view on Meta::CPAN

    my $depth = shift;
    my $press =  $depth  * $self->{waterfactor} / 10;
    return $press;
}

# use haldanian formula to solve the current pressure in tissue
# as long as the depth remains constant, this formula is still valid
sub _haldanePressure {
    my $self = shift;
    my $gas  = lc(shift) || 'n2';
    croak "Asking for unsupported gas $gas" unless exists $GASES{$gas};

    # we need the current tissure pressure, at t=0 for the depth
    my $tissue_press0 = $self->{$gas}->{pressure};
    #print "recalculating haldane formula. tissue pressure at t0 = $tissue_press0\n";

    # and the alveolar pressure
    my $alveolar = $self->_alveolarPressure( depth => $self->{depth} );

    # the time in minutes we have been at this depth, note that internal times are in seconds!

 view all matches for this distribution


Deliantra

 view release on metacpan or  search on metacpan

Deliantra/Data.pm  view on Meta::CPAN

	}
      ],
      [
	'is_cauldron',
	{
	  desc => 'If set, the container can be used as alchemy-cauldron. The player can put ingredients inside, close it, cast alchemy and if his formulae is true, he\'ll get what he longed for.',
	  name => 'alchemy cauldron',
	  type => 'bool'
	}
      ],
      [

 view all matches for this distribution


( run in 1.143 second using v1.01-cache-2.11-cpan-cd2fffc590a )