<?php /* $KimmoSuominen: findate.php,v 1.2 2007/08/25 20:43:04 kim Exp $ * * Copyright (c) 2007 Kimmo Suominen * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* Plugin Name: Finnish Dates Plugin URI: http://kimmo.suominen.com/sw/findate/ Description: Show date elements in Finnish Author: Kimmo Suominen Version: 0.1 Author URI: http://kimmo.suominen.com/ */ function ks_finnish_date() { global $weekday, $weekday_initial, $weekday_abbrev, $month, $month_abbrev; $weekday[0] = 'Sunnuntai'; $weekday[1] = 'Maanantai'; $weekday[2] = 'Tiistai'; $weekday[3] = 'Keskiviikko'; $weekday[4] = 'Torstai'; $weekday[5] = 'Perjantai'; $weekday[6] = 'Lauantai'; $weekday_initial[$weekday[0]] = 'S'; $weekday_initial[$weekday[1]] = 'M'; $weekday_initial[$weekday[2]] = 'T'; $weekday_initial[$weekday[3]] = 'K'; $weekday_initial[$weekday[4]] = 'T'; $weekday_initial[$weekday[5]] = 'P'; $weekday_initial[$weekday[6]] = 'L'; $weekday_abbrev[$weekday[0]] = 'Su'; $weekday_abbrev[$weekday[1]] = 'Ma'; $weekday_abbrev[$weekday[2]] = 'Ti'; $weekday_abbrev[$weekday[3]] = 'Ke'; $weekday_abbrev[$weekday[4]] = 'To'; $weekday_abbrev[$weekday[5]] = 'Pe'; $weekday_abbrev[$weekday[6]] = 'La'; $month['01'] = 'Tammikuu'; $month['02'] = 'Helmikuu'; $month['03'] = 'Maaliskuu'; $month['04'] = 'Huhtikuu'; $month['05'] = 'Toukokuu'; $month['06'] = 'Kesäkuu'; $month['07'] = 'Heinäkuu'; $month['08'] = 'Elokuu'; $month['09'] = 'Syyskuu'; $month['10'] = 'Lokakuu'; $month['11'] = 'Marraskuu'; $month['12'] = 'Joulukuu'; $month_abbrev[$month['01']] = 'Tam'; $month_abbrev[$month['02']] = 'Hel'; $month_abbrev[$month['03']] = 'Maa'; $month_abbrev[$month['04']] = 'Huh'; $month_abbrev[$month['05']] = 'Tou'; $month_abbrev[$month['06']] = 'Kes'; $month_abbrev[$month['07']] = 'Hei'; $month_abbrev[$month['08']] = 'Elo'; $month_abbrev[$month['09']] = 'Syy'; $month_abbrev[$month['10']] = 'Lok'; $month_abbrev[$month['11']] = 'Mar'; $month_abbrev[$month['12']] = 'Jou'; } add_action('init', 'ks_finnish_date'); ?>