| 1 | # Swiss Stock Exchange (SWX) setups. | ||
| 2 | |||
| 3 | # Copyright 2007, 2008, 2009, 2010 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::SW; | ||
| 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::Yahoo; | ||
| 28 | |||
| 29 | |||
| 30 | our $timezone_switzerland = App::Chart::TZ->new | ||
| 31 | (name => __('Switzerland'), | ||
| 32 | choose => [ 'Europe/Zurich' ], | ||
| 33 | fallback => 'CET-1'); | ||
| 34 | |||
| 35 | # http://au.finance.yahoo.com/intlindices | ||
| 36 | # ^SSMI - SMI | ||
| 37 | # and note not hitting ^SSEC (in SS.pm) | ||
| 38 | # | ||
| 39 | my $pred = App::Chart::Sympred::Regexp->new (qr/^\^SSM|\.SW$/); | ||
| 40 | |||
| 41 | $timezone_switzerland->setup_for_symbol ($pred); | ||
| 42 | |||
| 43 | |||
| 44 | #------------------------------------------------------------------------------ | ||
| 45 | # weblink - only the home page for now ... | ||
| 46 | # | ||
| 47 | # swx.com company info pages are based on ISIN codes, not the symbol, would | ||
| 48 | # need to extract that to do web links (if haven't already got it in the | ||
| 49 | # database info) | ||
| 50 | # | ||
| 51 | |||
| 52 | App::Chart::Weblink->new | ||
| 53 | (pred => $pred, | ||
| 54 | name => __('_SWX Home Page'), | ||
| 55 | desc => __('Open web browser at the Swiss Stock Exchange home page'), | ||
| 56 | url => 'http://www.swx.com'); | ||
| 57 | |||
| 58 | |||
| 59 | 1; | ||
| 60 | __END__ |