App/Chart/Suffix/MI.pm untested

filter: Statementstmt 0.0% 0 / 35 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod n/a totaltotal 0.0% 0 / 44 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # Milan Stock Exchange setups.
2  
3 # Copyright 2005, 2006, 2007, 2008, 2009 Kevin Ryde
4  
5 # This file is part of Chart.
6 #
7 # Chart is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 3, or (at your option) any later version.
10 #
11 # Chart is distributed in the hope that it will be useful, but WITHOUT ANY
12 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 # details.
15 #
16 # You should have received a copy of the GNU General Public License along
17 # with Chart. If not, see <http://www.gnu.org/licenses/>.
18  
19 package App::Chart::Suffix::MI;
20 use 5.006;
21 use strict;
22 use warnings;
23 use Locale::TextDomain 'App-Chart';
24  
25 use App::Chart;
26 use App::Chart::Sympred;
27 use App::Chart::TZ;
28 use App::Chart::Weblink;
29 use App::Chart::Yahoo;
30  
31  
32 # As of March 2007 the http://finance.yahoo.com/exchanges list doesn't
33 # include Milan any more, but it still seems to work.
34  
35  
36 our $timezone_milan = App::Chart::TZ->new
37 (name => __('Milan'),
38 # no separate entry for Milan in Olson database
39 choose => [ 'Europe/Milan', 'Europe/Rome' ],
40 fallback => 'CET-1');
41  
42 # ^MIBTEL
43 my $pred_indexes = App::Chart::Sympred::Prefix->new ('^MIB');
44  
45 my $pred_shares = App::Chart::Sympred::Suffix->new ('.MI');
46  
47 my $pred_any = App::Chart::Sympred::Any->new ($pred_indexes, $pred_shares);
48 $timezone_milan->setup_for_symbol ($pred_any);
49  
50 # ;; See: http://www.borsaitaliana.it/chisiamo/mercatigestiti/orari/orarionegoziazioni.en.htm
51 # ;; pre-open from 8:00, trading until 17:00 main and 17:30 mot, then
52 # ;; after-hours 18:00 to 20:30
53 # (yahoo-quote-lock! milan-symbol?
54 # #,(hms->seconds 8 0 0) #,(hms->seconds 20 30 0))
55  
56  
57 #------------------------------------------------------------------------------
58 # weblink - only the home page for now ...
59 #
60 # Profile links are based on ISIN, eg IT.MI
61 # http://www.borsaitaliana.it/bitApp/scheda.bit?target=StrumentoMTA&isin=IT0001465159&lang=en
62  
63 App::Chart::Weblink->new
64 (pred => $pred_any,
65 name => __('_Milan Stock Exchange Home Page'),
66 desc => __('Open web browser at the Milan Stock Exchange home page'),
67 url => 'http://www.borsaitaliana.it');
68  
69  
70 1;
71 __END__