Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.357.648 Times

Date::Holidays::PT 0.02

Company: Jos?A© Alves de Castro
Date Added: November 23, 2013  |  Visits: 470

Date::Holidays::PT

Report Broken Link
Printer Friendly Version


Product Homepage
Download (33 downloads)



Date::Holidays::PT - Determine Portuguese public holidays<br /><br />SYNOPSIS<br /><br /> use Date::Holidays::PT;<br /> my ($year, $month, $day) = (localtime)[ 5, 4, 3 ];<br /> $year += 1900;<br /> $month += 1;<br /> print "Woohoo" if is_pt_holiday( $year, $month, $day );<br /><br /> my $h = pt_holidays($year);<br /> printf "Jan. 1st is named '%s'<br />", $h->{'0101'};<br /><br />FUNCTIONS<br /><br />new<br /><br />Creates a new Date::Holidays::PT object.<br /><br /> my $mh = Date::Holidays::PT->new();<br /><br />is_holiday<br /><br />Should at least take three arguments:<br /><br />year (four digits) month (between 1-12) day (between 1-31)<br /><br />The return value from is_holiday is either a 1 or a 0 (1 if the specified date is a holiday, 0 otherwise).<br /><br /> if ( $mh->is_holiday( $year, $month, $day ) ) {<br /> # it's a holiday<br /> }<br /><br />is_pt_holiday<br /><br />Similar to is_holiday, but instead of returning 1 if the date is a holiday returns a string comprising the name of the holidays. In the event of two or more holidays on the same day (hey, it happens), the string will comprise the name of all those holidays separated by a semicolon.<br /><br /> my $todays_holiday = $mh->is_pt_holiday( $year, $month, $day );<br /> if ( $todays_holiday ) {<br /> print "Today is $todays_holiday.<br />Don't bother getting up!<br />";<br /> }<br /><br />holidays<br /><br />Should take at least one argument:<br /><br />year (four digits)<br /><br />Returns a reference to a hash, where the keys are date represented as four digits, the two first representing month (01-12) and the last two representing day (01-31).<br /><br />The value for the key in question is the local name for the holiday indicated by the day. In the event of two or more holidays on the same day (yes, it happens!), the values will comprise the name of all those holidays separated by a semicolon.<br /><br /> my $years_holidays = holidays( $year );<br /> for (keys %$years_holidays) {<br /> my ($day, $month) = /(..)(..)/;<br /> print "$day/$month - $years_holidays->$_<br />";<br /> }<br />

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Comprise Dateholidayspt Digits Event Holiday Holidays Month Print Representing Semicolon Separated String Todays Holiday Years Holidays
Users rating: 0/10

License: Freeware Size: 10.24 KB
USER REVIEWS
More Reviews or Write Review


DATE::HOLIDAYS::PT RELATED
Libraries  -  Tk::event 804.027
Tk::event contains miscellaneous event facilities: define virtual events and generate events. SYNOPSIS $widget->eventAction(?arg, arg, ...?); The eventAction methods provides several facilities for dealing with window system events, such as...
5.7 MB  
Dial-up Networking Tools  -  Netwrix Event Log Manager 4.025.263
Event log data is a critical source of information for security audit, compliance, and troubleshooting purposes. Major compliance regulations require event log audit data to be archived for up to 7 years. Netwrix Event Log Archiver is a free...
4.5 MB  
Application Add-Ins  -  Mini PIM 1.2
Mini PIM is a freeware personal information manager based on InfoQwik. Easily manage your contacts. Design, edit and print mailing labels. Keep track of your important passwords. Manage your appointments and meetings. A powerhouse program in a...
4.35 MB  
Libraries  -  iCal::Parser::SAX 1.07
iCal::Parser::SAX is a Perl module to generate SAX events from an iCalendar. SYNOPSIS use iCal::Parser::SAX; my $parser=iCal::Parser::SAX->new(Handler=>SAXHandler,%args); $parser->parse_uri($file); $parser->parse_uris(@files); This module...
22.53 KB  
Libraries  -  WebService::Eventful 1.0
WebService::Eventful is a Perl interface to EVDB public API. SYNOPSIS use WebService::Eventful; my $evdb = WebService::Eventful->new(app_key => $app_key); $evdb->login(user => harry, password => H0gwart$) or die "Cant log in:...
8.19 KB  
Libraries  -  MIME::Head 5.420
MIME::Head is a MIME message header (a subclass of Mail::Header). SYNOPSIS Before reading further, you should see MIME::Tools to make sure that you understand where this module fits into the grand scheme of things. Go on, do it now. Ill wait....
389.12 KB  
Networking Tools  -  ETTERLOG 1.0
ETTERLOG is a utility for Network Lan (SWITCH) for file .ECI and .ECP. (Ettercap program). Etterlog is the log analyzer for logfiles created by ettercap. It can handle both compressed (created with -Lc) or uncompressed logfiles. With this tool...
112.64 KB  
Libraries  -  Sys::Gamin 0.1
Sys::Gamin is a Perl interface to Gamin (File Access Monitor implementation). SYNOPSIS use Sys::Gamin; my $fm=new Sys::Gamin; $fm->monitor(/foo); $fm->monitor(/foo/bar.txt); while (1) { my $event=$fm->next_event; # Blocks print...
7.17 KB  
Libraries  -  Math::String 1.27
Math::String module contains arbitrary sized integers having arbitrary charsets to calculate with key rooms. SYNOPSIS use Math::String; use Math::String::Charset; $a = new Math::String cafebabe; # default a-z $b = new Math::String...
61.44 KB  
Libraries  -  Webalizer::Hist 0.02
Webalizer::Hist is a Perl module to parse the webalizer.hist-file. SYNOPSIS use Webalizer::Hist; if(my $dwh = Webalizer::Hist->new(source => "webalizer.hist")) { while(my $hashref = $dwh->month()) { print "Got " . $hashref->{totalhits} ....
5.12 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB