Schlagwort-Archive: jquery

Extbase / Fluid: Image ViewHelper erweitern für Lazyloading

Mobile ist im kommen. Vielleicht kann es auch auf umfangreichen Seiten mit vielen Bilder nötig sein, Bilder erst zu laden wenn diese im sichtbaren Bereich erscheinen um Ladezeiten zu verkürzen bzw. aufzuteilen. Twitter und Facebook nutzen diese Technik und bei der Bildersuche in Suchmaschinen dürfte dieses Feature schon mal aufgefallen sein.

Im jQuery Plugin Fundus gibt es eine Lösung: Lazy Load Plugin for jQuery . Weitere Argumente für Lazy Loading sind auf dieser Homepage zu finden ;-)

Und zu guter letzt auch noch ein LazyImage ViewHelper für Fluid. Dieser erweitert den Standard ViewHelper und tauscht das „src“-Attribut gegen das „data-original“-Attribut für das jQuery Plugin.

<?php
namespace YourVendor\YourExtKey\ViewHelpers;

/***************************************************************
 *  Copyright notice
 *
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
 *  free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  The GNU General Public License can be found at
 *  http://www.gnu.org/copyleft/gpl.html.
 *
 *  This script is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/

class LazyImageViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper {

	/**
	 * Initialize arguments.
	 *
	 * @return void
	 */
	public function initializeArguments() {
		parent::initializeArguments();
		$this->registerTagAttribute('data-original', 'string', 'original image for lazy loading', FALSE);
	}

	/**
	 * Resizes a given image (if required) and renders the respective img tag
	 *
	 * @see http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4164427
	 * @param string $src a path to a file, a combined FAL identifier or an uid (integer). If $treatIdAsReference is set, the integer is considered the uid of the sys_file_reference record. If you already got a FAL object, consider using the $image parameter instead
	 * @param string $width width of the image. This can be a numeric value representing the fixed width of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
	 * @param string $height height of the image. This can be a numeric value representing the fixed height of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
	 * @param integer $minWidth minimum width of the image
	 * @param integer $minHeight minimum height of the image
	 * @param integer $maxWidth maximum width of the image
	 * @param integer $maxHeight maximum height of the image
	 * @param boolean $treatIdAsReference given src argument is a sys_file_reference record
	 * @param FileInterface|AbstractFileFolder $image a FAL object
	 *
	 * @throws \TYPO3\CMS\Fluid\Core\ViewHelper\Exception
	 * @return string Rendered tag
	 */
	public function render($src = NULL, $width = NULL, $height = NULL, $minWidth = NULL, $minHeight = NULL, $maxWidth = NULL, $maxHeight = NULL, $treatIdAsReference = FALSE, $image = NULL) {
		if (is_null($src) && is_null($image) || !is_null($src) && !is_null($image)) {
			throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('You must either specify a string src or a File object.', 1382284106);
		}
		$image = $this->imageService->getImage($src, $image, $treatIdAsReference);
		$processingInstructions = array(
			'width' => $width,
			'height' => $height,
			'minWidth' => $minWidth,
			'minHeight' => $minHeight,
			'maxWidth' => $maxWidth,
			'maxHeight' => $maxHeight,
		);
		$processedImage = $this->imageService->applyProcessingInstructions($image, $processingInstructions);
		$imageUri = $this->imageService->getImageUri($processedImage);

		$this->tag->addAttribute('data-original', $imageUri);
		$this->tag->addAttribute('width', $processedImage->getProperty('width'));
		$this->tag->addAttribute('height', $processedImage->getProperty('height'));

		$alt = $image->getProperty('alternative');
		$title = $image->getProperty('title');

		// The alt-attribute is mandatory to have valid html-code, therefore add it even if it is empty
		if (empty($this->arguments['alt'])) {
			$this->tag->addAttribute('alt', $alt);
		}
		if (empty($this->arguments['title']) && $title) {
			$this->tag->addAttribute('title', $title);
		}

		return $this->tag->render();
	}
}

?>

 

Javascript: Ferientermine für den jQuery UI Datepicker

Der jQuery UI Datepicker ist eine feine Sache. Nur manchmal möchte man weitere Informationen zu den jeweiligen Tagen anzeigen.

Wenn der Datepicker initialisiert wird kann dies über die Option „beforeShowDay“ erledigt werden.

var Datepicker = {
    options: {
        dateFormat: 'yy-mm-dd',
        defaultDate: +7,
        duration: 'fast',
        numberOfMonths: 2,
        showButtonPanel: true,
        monthNames: Translation[L].monthNames,
        monthNamesShort: Translation[L].monthNamesShort,
        dayNames: Translation[L].dayNames,
        dayNamesMin: Translation[L].dayNamesMin,
        dayNamesShort: Translation[L].dayNamesShort,
        nextText: Translation[L].nextText,
        prevText: Translation[L].prevText,
        closeText: Translation[L].closeText,
        currentText: Translation[L].currentText,
        beforeShowDay: function(date){
          label = ''
          regions = HD.getAllRegionNamesForDate(date)
          if (regions.length > 0) {
            label = 'Schulferien in: ' + regions.join(', ')
          }
          if(date.getDay()==1){
            return [true,"", label];
          } else {
            return [false,"", label];
          }
        },
      beforeShow: function () {
      }
    }
}

Innerhalb dieses Events kann jeder einzelne Tag beeinflusst werden. Als Eingangsargument wird das aktuelle Date Object übergeben.

Im zurück gegebenen Array wird die Darstellung des Tages gesteuert:

[
  true/false, // Tag auswählbar ja/naei
  'classname',  // zusätzliche CSS Klasse zum stylen
  'titletext'  // zusätzlicher title Text
]

Folgend noch das kleine Snippet für die Ferientermine in Deutschland. Natürlich kann man die HD (Holiday) Klasse um eigene Methoden erweitern. Alle Angaben ohne Gewähr ;-)

/**
 * @author Christian Sonntag <xxx@xxx.de>
 * @description mini class for holidays ;o)
 * @param {string} from date as string 'yyyy-mm-dd'
 * @param {string} to date as string 'yyyy-mm-dd'
 * @param {string} text of holidy season
 */

function Holiday(from, to, text) {
	//    this.from = this.parseISO8601(from)
	//    this.to = this.parseISO8601(to)
	this.from = $.datepicker.parseDate('yy-mm-dd', from)
	this.to = $.datepicker.parseDate('yy-mm-dd', to)
	this.text = text

}
/**
 * for ancient browsers or use jquery dateParser see constructor
 */
Holiday.prototype.parseISO8601 = function(dateStringInRange) {
	var isoExp = /^\s*(\d{4})-(\d\d)-(\d\d)\s*$/,
		date = new Date(NaN),
		month,
		parts = isoExp.exec(dateStringInRange);

	if (parts) {
		month = +parts[2];
		date.setFullYear(parts[1], month - 1, parts[3]);
		if (month != date.getMonth() + 1) {
			date.setTime(NaN);
		}
	}
	return date;
}

/**
 * @author Christian Sonntag <xxx@xxx.de>
 *
 * Ferientermine Deutschland
 * http://www.schnelle-online.info/
 * http://www.bmelv-statistik.de/de/daten-tabellen-suche/abkuerzungen-der-bundeslaender/
 */
var HD = {
	/**
	 * @params {date} date object
	 * @return {array} all region names found for given date
	 */
	getAllRegionNamesForDate: function(date) {
		names = []
		for (var i = 0, l = HD.regions.length; i < l; i++) {
			holidays = HD.regions[i].holidays
			for (var j = 0, m = holidays.length; j < m; j++) {
				holiday = holidays[j]
				if (holiday.from <= date && holiday.to >= date) {
					names.push(HD.regions[i].region)
				}
			}
		}
		return names
	},
	/**
	 * @params {date} date object
	 * @return {string} returns the holyday name
	 */
	getHolydayname: function(date) {
		name = ''
		for (var i = 0, l = HD.regions.length; i < l; i++) {
			if (HD.regions[i].code == Search.holiday) {
				holidays = HD.regions[i].holidays
				for (var j = 0, m = holidays.length; j < m; j++) {
					holiday = holidays[j]
					if (holiday.from <= date && holiday.to >= date) {
						name = holiday.text
					}
				}
			}
		}
		return name
	},

	regions: [{
		code: 'BW',
		region: 'Baden-Württemberg',
		holidays: [
		new Holiday("2012-07-26", "2012-09-08", "Sommerferien 2012"),
		new Holiday("2012-10-29", "2012-11-02", "Herbstferien 2012"),
		new Holiday("2012-04-02", "2012-04-13", "Osterferien 2012"),
		new Holiday("2012-05-29", "2012-06-09", "Pfingstferien 2012"),
		new Holiday("2012-12-24", "2013-01-05", "Weihnachtsferien 2012"),
		new Holiday("2013-07-25", "2013-09-07", "Sommerferien 2013"),
		new Holiday("2013-10-28", "2013-10-30", "Herbstferien 2013"),
		new Holiday("2013-03-25", "2013-04-05", "Osterferien 2013"),
		new Holiday("2013-05-21", "2013-06-01", "Pfingstferien 2013"),
		new Holiday("2013-12-23", "2014-01-04", "Weihnachtsferien 2013"),
		new Holiday("2014-07-31", "2014-09-13", "Sommerferien 2014"),
		new Holiday("2014-10-27", "2014-10-30", "Herbstferien 2014"),
		new Holiday("2014-04-14", "2014-04-25", "Osterferien 2014"),
		new Holiday("2014-06-10", "2014-06-21", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-05", "Weihnachtsferien 2014")]
	}, {
		code: 'BY',
		region: 'Bayern',
		holidays: [
		new Holiday("2012-02-20", "2012-02-24", "Winterferien 2012"),
		new Holiday("2012-08-01", "2012-09-12", "Sommerferien 2012"),
		new Holiday("2012-10-29", "2012-11-03", "Herbstferien 2012"),
		new Holiday("2012-04-02", "2012-04-14", "Osterferien 2012"),
		new Holiday("2012-05-29", "2012-06-09", "Pfingstferien 2012"),
		new Holiday("2012-12-24", "2013-01-05", "Weihnachtsferien 2012"),
		new Holiday("2013-02-11", "2013-02-15", "Winterferien 2013"),
		new Holiday("2013-07-31", "2013-09-11", "Sommerferien 2013"),
		new Holiday("2013-10-28", "2013-10-31", "Herbstferien 2013"),
		new Holiday("2013-03-25", "2013-04-06", "Osterferien 2013"),
		new Holiday("2013-05-21", "2013-05-31", "Pfingstferien 2013"),
		new Holiday("2013-12-23", "2014-01-04", "Weihnachtsferien 2013"),
		new Holiday("2014-03-03", "2014-03-07", "Winterferien 2014"),
		new Holiday("2014-07-30", "2014-09-15", "Sommerferien 2014"),
		new Holiday("2014-10-27", "2014-10-31", "Herbstferien 2014"),
		new Holiday("2014-04-14", "2014-04-26", "Osterferien 2014"),
		new Holiday("2014-06-10", "2014-06-21", "Pfingstferien 2014"),
		new Holiday("2014-12-24", "2015-01-05", "Weihnachtsferien 2014")]

	}, {
		code: 'BE',
		region: 'Berlin',
		holidays: [
		new Holiday("2012-01-30", "2012-02-04", "Winterferien 2012"),
		new Holiday("2012-06-20", "2012-08-03", "Sommerferien 2012"),
		new Holiday("2012-10-01", "2012-10-13", "Herbstferien 2012"),
		new Holiday("2012-04-02", "2012-04-14", "Osterferien 2012"),
		new Holiday("2012-05-18", "2012-05-18", "Pfingstferien 2012"),
		new Holiday("2012-12-24", "2013-01-04", "Weihnachtsferien 2012"),
		new Holiday("2013-02-04", "2013-02-09", "Winterferien 2013"),
		new Holiday("2013-06-19", "2013-08-02", "Sommerferien 2013"),
		new Holiday("2013-09-30", "2013-10-12", "Herbstferien 2013"),
		new Holiday("2013-03-25", "2013-04-06", "Osterferien 2013"),
		new Holiday("2013-05-10", "2013-05-10", "Pfingstferien 2013"),
		new Holiday("2013-12-23", "2014-01-03", "Weihnachtsferien 2013"),
		new Holiday("2014-02-03", "2014-02-08", "Winterferien 2014"),
		new Holiday("2014-07-09", "2014-08-22", "Sommerferien 2014"),
		new Holiday("2014-10-20", "2014-11-01", "Herbstferien 2014"),
		new Holiday("2014-04-14", "2014-04-26", "Osterferien 2014"),
		new Holiday("2014-05-30", "2014-05-30", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-04", "Weihnachtsferien 2014")]
	}, {
		code: 'BB',
		region: 'Brandenburg',
		holidays: [
		new Holiday("2012-01-30", "2012-02-04", "Winterferien 2012"),
		new Holiday("2012-06-21", "2012-08-03", "Sommerferien 2012"),
		new Holiday("2012-10-01", "2012-10-13", "Herbstferien 2012"),
		new Holiday("2012-01-30", "2012-04-14", "Osterferien 2012"),
		new Holiday("2012-05-18", "2012-05-18", "Pfingstferien 2012"),
		new Holiday("2012-12-24", "2013-01-04", "Weihnachtsferien 2012"),
		new Holiday("2013-02-04", "2013-02-09", "Winterferien 2013"),
		new Holiday("2013-06-20", "2013-08-02", "Sommerferien 2013"),
		new Holiday("2013-09-30", "2013-10-12", "Herbstferien 2013"),
		new Holiday("2013-03-27", "2013-04-06", "Osterferien 2013"),
		new Holiday("2013-05-10", "2013-05-10", "Pfingstferien 2013"),
		new Holiday("2013-12-23", "2014-01-03", "Weihnachtsferien 2013"),
		new Holiday("2014-02-03", "2014-02-08", "Winterferien 2014"),
		new Holiday("2014-07-10", "2014-08-22", "Sommerferien 2014"),
		new Holiday("2014-10-20", "2014-11-01", "Herbstferien 2014"),
		new Holiday("2014-04-14", "2014-04-26", "Osterferien 2014"),
		new Holiday("2014-05-30", "2014-05-30", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-04", "Weihnachtsferien 2014")]
	}, {
		code: 'HB',
		region: 'Bremen',
		holidays: [
		new Holiday("2012-01-30", "2012-01-31", "Winterferien 2012"),
		new Holiday("2012-07-23", "2012-08-31", "Sommerferien 2012"),
		new Holiday("2012-10-22", "2012-11-03", "Herbstferien 2012"),
		new Holiday("2012-03-26", "2012-04-11", "Osterferien 2012"),
		new Holiday("2012-05-18", "2012-05-18", "Pfingstferien 2012"),
		new Holiday("2012-12-24", "2013-01-05", "Weihnachtsferien 2012"),
		new Holiday("2013-01-31", "2013-02-01", "Winterferien 2013"),
		new Holiday("2013-06-27", "2013-08-07", "Sommerferien 2013"),
		new Holiday("2013-10-04", "2013-10-18", "Herbstferien 2013"),
		new Holiday("2013-03-16", "2013-04-02", "Osterferien 2013"),
		new Holiday("2013-05-10", "2013-05-10", "Pfingstferien 2013"),
		new Holiday("2013-12-23", "2014-01-03", "Weihnachtsferien 2013"),
		new Holiday("2014-01-30", "2014-01-31", "Winterferien 2014"),
		new Holiday("2014-07-31", "2014-09-10", "Sommerferien 2014"),
		new Holiday("2014-10-27", "2014-11-08", "Herbstferien 2014"),
		new Holiday("2014-04-03", "2014-04-22", "Osterferien 2014"),
		new Holiday("2014-05-30", "2014-05-30", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-05", "Weihnachtsferien 2014")]
	}, {
		code: 'HH',
		region: 'Hamburg',
		holidays: [
		new Holiday("2012-01-30", "2012-01-30", "Winterferien 2012"),
		new Holiday("2012-06-21", "2012-08-01", "Sommerferien 2012"),
		new Holiday("2012-10-01", "2012-10-12", "Herbstferien 2012"),
		new Holiday("2012-03-05", "2012-03-16", "Osterferien 2012"),
		new Holiday("2012-04-30", "2012-05-04", "Pfingstferien 2012"),
		new Holiday("2012-12-21", "2013-01-04", "Weihnachtsferien 2012"),
		new Holiday("2013-02-01", "2013-02-01", "Winterferien 2013"),
		new Holiday("2013-06-20", "2013-07-31", "Sommerferien 2013"),
		new Holiday("2013-09-30", "2013-10-11", "Herbstferien 2013"),
		new Holiday("2013-03-04", "2013-03-15", "Osterferien 2013"),
		new Holiday("2013-05-02", "2013-05-10", "Pfingstferien 2013"),
		new Holiday("2013-12-19", "2014-01-03", "Weihnachtsferien 2013"),
		new Holiday("2014-01-31", "2014-01-31", "Winterferien 2014"),
		new Holiday("2014-07-10", "2014-08-20", "Sommerferien 2014"),
		new Holiday("2014-10-13", "2014-10-24", "Herbstferien 2014"),
		new Holiday("2014-03-03", "2014-03-14", "Osterferien 2014"),
		new Holiday("2014-03-14", "2014-05-02", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-04", "Weihnachtsferien 2014")]
	}, {
		code: 'HE',
		region: 'Hessen',
		holidays: [
		new Holiday("2012-07-02", "2012-08-10", "Sommerferien 2012"),
		new Holiday("2012-10-15", "2012-10-27", "Herbstferien 2012"),
		new Holiday("2012-04-02", "2012-04-14", "Osterferien 2012"),
		new Holiday("2012-12-24", "2013-01-12", "Weihnachtsferien 2012"),
		new Holiday("2013-07-08", "2013-08-16", "Sommerferien 2013"),
		new Holiday("2013-10-14", "2013-10-26", "Herbstferien 2013"),
		new Holiday("2013-03-25", "2013-04-06", "Osterferien 2013"),
		new Holiday("2013-12-23", "2014-01-11", "Weihnachtsferien 2013"),
		new Holiday("2014-07-28", "2014-09-05", "Sommerferien 2014"),
		new Holiday("2014-10-20", "2014-11-01", "Herbstferien 2014"),
		new Holiday("2014-04-14", "2014-04-26", "Osterferien 2014"),
		new Holiday("2014-12-22", "2015-01-12", "Weihnachtsferien 2014")]
	}, {
		code: 'MV',
		region: 'Mecklenburg-Vorpommern',
		holidays: [
		new Holiday("2012-02-06", "2012-02-17", "Winterferien 2012"),
		new Holiday("2012-06-23", "2012-08-04", "Sommerferien 2012"),
		new Holiday("2012-10-01", "2012-10-05", "Herbstferien 2012"),
		new Holiday("2012-04-02", "2012-04-11", "Osterferien 2012"),
		new Holiday("2012-05-25", "2012-05-29", "Pfingstferien 2012"),
		new Holiday("2012-12-21", "2013-01-04", "Weihnachtsferien 2012"),
		new Holiday("2013-02-04", "2013-02-15", "Winterferien 2013"),
		new Holiday("2013-06-22", "2013-08-03", "Sommerferien 2013"),
		new Holiday("2013-10-14", "2013-10-19", "Herbstferien 2013"),
		new Holiday("2013-03-25", "2013-04-03", "Osterferien 2013"),
		new Holiday("2013-05-17", "2013-05-21", "Pfingstferien 2013"),
		new Holiday("2013-12-23", "2014-01-03", "Weihnachtsferien 2013"),
		new Holiday("2014-02-03", "2014-02-15", "Winterferien 2014"),
		new Holiday("2014-07-14", "2014-08-23", "Sommerferien 2014"),
		new Holiday("2014-10-20", "2014-10-25", "Herbstferien 2014"),
		new Holiday("2014-04-14", "2014-04-23", "Osterferien 2014"),
		new Holiday("2014-06-06", "2014-06-10", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-04", "Weihnachtsferien 2014")]
	}, {
		code: 'NI',
		region: 'Niedersachsen',
		holidays: [
		new Holiday("2012-01-30", "2012-01-31", "Winterferien 2012"),
		new Holiday("2012-07-23", "2012-08-31", "Sommerferien 2012"),
		new Holiday("2012-10-22", "2012-11-03", "Herbstferien 2012"),
		new Holiday("2012-03-26", "2012-04-11", "Osterferien 2012"),
		new Holiday("2012-05-18", "2012-05-18", "Pfingstferien 2012"),
		new Holiday("2012-12-24", "2013-01-05", "Weihnachtsferien 2012"),
		new Holiday("2013-01-31", "2013-02-01", "Winterferien 2013"),
		new Holiday("2013-06-27", "2013-08-07", "Sommerferien 2013"),
		new Holiday("2013-10-04", "2013-10-18", "Herbstferien 2013"),
		new Holiday("2013-03-16", "2013-04-02", "Osterferien 2013"),
		new Holiday("2013-05-10", "2013-05-10", "Pfingstferien 2013"),
		new Holiday("2013-12-23", "2014-01-03", "Weihnachtsferien 2013"),
		new Holiday("2014-01-30", "2014-01-31", "Winterferien 2014"),
		new Holiday("2014-07-31", "2014-09-10", "Sommerferien 2014"),
		new Holiday("2014-10-27", "2014-11-08", "Herbstferien 2014"),
		new Holiday("2014-04-03", "2014-04-22", "Osterferien 2014"),
		new Holiday("2014-06-10", "2014-06-10", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-05", "Weihnachtsferien 2014")]
	}, {
		code: 'NW',
		region: 'Nordrhein-Westfalen',
		holidays: [
		new Holiday("2012-07-09", "2012-08-21", "Sommerferien 2012"),
		new Holiday("2012-10-08", "2012-10-20", "Herbstferien 2012"),
		new Holiday("2012-04-02", "2012-04-14", "Osterferien 2012"),
		new Holiday("2012-05-29", "2012-05-29", "Pfingstferien 2012"),
		new Holiday("2012-12-21", "2013-01-04", "Weihnachtsferien 2012"),
		new Holiday("2013-07-22", "2013-09-03", "Sommerferien 2013"),
		new Holiday("2013-10-21", "2013-11-02", "Herbstferien 2013"),
		new Holiday("2013-03-25", "2013-04-06", "Osterferien 2013"),
		new Holiday("2013-05-21", "2013-05-21", "Pfingstferien 2013"),
		new Holiday("2013-12-23", "2014-01-07", "Weihnachtsferien 2013"),
		new Holiday("2014-07-07", "2014-08-19", "Sommerferien 2014"),
		new Holiday("2014-10-06", "2014-10-18", "Herbstferien 2014"),
		new Holiday("2014-04-14", "2014-04-26", "Osterferien 2014"),
		new Holiday("2014-06-10", "2014-06-10", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-04", "Weihnachtsferien 2014")]
	}, {
		code: 'PR',
		region: 'Rheinland-Pfalz',
		holidays: [
		new Holiday("2012-07-02", "2012-08-10", "Sommerferien 2012"),
		new Holiday("2012-10-01", "2012-10-12", "Herbstferien 2012"),
		new Holiday("2012-03-29", "2012-04-13", "Osterferien 2012"),
		new Holiday("2012-12-20", "2013-01-04", "Weihnachtsferien 2012"),
		new Holiday("2013-07-08", "2013-08-16", "Sommerferien 2013"),
		new Holiday("2013-10-04", "2013-10-18", "Herbstferien 2013"),
		new Holiday("2013-03-20", "2013-04-05", "Osterferien 2013"),
		new Holiday("2013-12-23", "2014-01-07", "Weihnachtsferien 2013"),
		new Holiday("2014-07-28", "2014-09-05", "Sommerferien 2014"),
		new Holiday("2014-10-20", "2014-10-31", "Herbstferien 2014"),
		new Holiday("2014-04-11", "2014-04-25", "Osterferien 2014"),
		new Holiday("2014-12-22", "2015-01-04", "Weihnachtsferien 2014")]
	}, {
		code: 'SL',
		region: 'Saarland',
		holidays: [
		new Holiday("2012-02-20", "2012-02-25", "Winterferien 2012"),
		new Holiday("2012-07-02", "2012-08-14", "Sommerferien 2012"),
		new Holiday("2012-10-22", "2012-11-03", "Herbstferien 2012"),
		new Holiday("2012-04-02", "2012-04-14", "Osterferien 2012"),
		new Holiday("2012-12-24", "2013-01-05", "Weihnachtsferien 2012"),
		new Holiday("2013-02-11", "2013-02-16", "Winterferien 2013"),
		new Holiday("2013-07-08", "2013-08-17", "Sommerferien 2013"),
		new Holiday("2013-10-21", "2013-11-02", "Herbstferien 2013"),
		new Holiday("2013-03-25", "2013-04-06", "Osterferien 2013"),
		new Holiday("2013-12-20", "2014-01-04", "Weihnachtsferien 2013"),
		new Holiday("2014-03-03", "2014-03-08", "Winterferien 2014"),
		new Holiday("2014-07-28", "2014-09-06", "Sommerferien 2014"),
		new Holiday("2014-10-20", "2014-10-31", "Herbstferien 2014"),
		new Holiday("2014-04-14", "2014-04-26", "Osterferien 2014"),
		new Holiday("2014-12-22", "2015-01-05", "Weihnachtsferien 2014")]
	}, {
		code: 'SN',
		region: 'Sachsen',
		holidays: [
		new Holiday("2012-02-13", "2012-02-25", "Winterferien 2012"),
		new Holiday("2012-07-23", "2012-08-31", "Sommerferien 2012"),
		new Holiday("2012-10-22", "2012-11-02", "Herbstferien 2012"),
		new Holiday("2012-04-06", "2012-04-14", "Osterferien 2012"),
		new Holiday("2012-05-18", "2012-05-18", "Pfingstferien 2012"),
		new Holiday("2012-12-22", "2013-01-02", "Weihnachtsferien 2012"),
		new Holiday("2013-02-04", "2013-02-15", "Winterferien 2013"),
		new Holiday("2013-07-15", "2013-08-23", "Sommerferien 2013"),
		new Holiday("2013-10-21", "2013-11-01", "Herbstferien 2013"),
		new Holiday("2013-03-29", "2013-04-06", "Osterferien 2013"),
		new Holiday("2013-05-18", "2013-05-22", "Pfingstferien 2013"),
		new Holiday("2013-12-21", "2014-01-03", "Weihnachtsferien 2013"),
		new Holiday("2014-02-17", "2014-03-01", "Winterferien 2014"),
		new Holiday("2014-07-21", "2014-08-29", "Sommerferien 2014"),
		new Holiday("2014-10-20", "2014-10-31", "Herbstferien 2014"),
		new Holiday("2014-04-18", "2014-04-26", "Osterferien 2014"),
		new Holiday("2014-05-30", "2014-05-30", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-02", "Weihnachtsferien 2014")

		]
	}, {
		code: 'ST',
		region: 'Sachsen-Anhalt',
		holidays: [
		new Holiday("2012-02-04", "2012-02-11", "Winterferien 2012"),
		new Holiday("2012-07-23", "2012-09-05", "Sommerferien 2012"),
		new Holiday("2012-10-29", "2012-11-02", "Herbstferien 2012"),
		new Holiday("2012-04-02", "2012-04-07", "Osterferien 2012"),
		new Holiday("2012-05-18", "2012-05-25", "Pfingstferien 2012"),
		new Holiday("2012-12-19", "2013-01-04", "Weihnachtsferien 2012"),
		new Holiday("2013-02-01", "2013-02-08", "Winterferien 2013"),
		new Holiday("2013-07-15", "2013-08-28", "Sommerferien 2013"),
		new Holiday("2013-10-21", "2013-10-25", "Herbstferien 2013"),
		new Holiday("2013-03-25", "2013-03-30", "Osterferien 2013"),
		new Holiday("2013-05-10", "2013-05-18", "Pfingstferien 2013"),
		new Holiday("2013-12-21", "2014-01-03", "Weihnachtsferien 2013"),
		new Holiday("2014-02-01", "2014-02-12", "Winterferien 2014"),
		new Holiday("2014-07-21", "2014-09-03", "Sommerferien 2014"),
		new Holiday("2014-10-27", "2014-10-30", "Herbstferien 2014"),
		new Holiday("2014-04-14", "2014-04-17", "Osterferien 2014"),
		new Holiday("2014-05-30", "2014-06-07", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-04", "Weihnachtsferien 2014")]
	}, {
		code: 'SH',
		region: 'Schleswig-Holstein',
		holidays: [
		new Holiday("2012-06-25", "2012-08-04", "Sommerferien 2012"),
		new Holiday("2012-10-04", "2012-10-19", "Herbstferien 2012"),
		new Holiday("2012-03-30", "2012-04-13", "Osterferien 2012"),
		new Holiday("2012-05-18", "2012-05-18", "Pfingstferien 2012"),
		new Holiday("2012-12-24", "2013-01-05", "Weihnachtsferien 2012"),
		new Holiday("2013-06-24", "2013-08-03", "Sommerferien 2013"),
		new Holiday("2013-10-04", "2013-10-18", "Herbstferien 2013"),
		new Holiday("2013-03-25", "2013-04-09", "Osterferien 2013"),
		new Holiday("2013-05-10", "2013-05-10", "Pfingstferien 2013"),
		new Holiday("2013-12-23", "2014-01-06", "Weihnachtsferien 2013"),
		new Holiday("2014-07-14", "2014-08-23", "Sommerferien 2014"),
		new Holiday("2014-10-13", "2014-10-25", "Herbstferien 2014"),
		new Holiday("2014-04-16", "2014-05-02", "Osterferien 2014"),
		new Holiday("2014-05-30", "2014-05-30", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-05", "Weihnachtsferien 2014")]
	}, {
		code: 'TH',
		region: 'Thüringen',
		holidays: [
		new Holiday("2012-02-06", "2012-02-11", "Winterferien 2012"),
		new Holiday("2012-07-23", "2012-08-31", "Sommerferien 2012"),
		new Holiday("2012-10-22", "2012-11-03", "Herbstferien 2012"),
		new Holiday("2012-04-02", "2012-04-13", "Osterferien 2012"),
		new Holiday("2012-05-25", "2012-05-29", "Pfingstferien 2012"),
		new Holiday("2012-12-24", "2013-01-05", "Weihnachtsferien 2012"),
		new Holiday("2013-02-18", "2013-02-23", "Winterferien 2013"),
		new Holiday("2013-07-15", "2013-08-23", "Sommerferien 2013"),
		new Holiday("2013-10-21", "2013-11-02", "Herbstferien 2013"),
		new Holiday("2013-03-25", "2013-04-06", "Osterferien 2013"),
		new Holiday("2013-05-10", "2013-05-10", "Pfingstferien 2013"),
		new Holiday("2013-12-23", "2014-01-04", "Weihnachtsferien 2013"),
		new Holiday("2014-02-17", "2014-02-22", "Winterferien 2014"),
		new Holiday("2014-07-21", "2014-08-29", "Sommerferien 2014"),
		new Holiday("2014-10-06", "2014-10-18", "Herbstferien 2014"),
		new Holiday("2014-04-19", "2014-05-02", "Osterferien 2014"),
		new Holiday("2014-05-30", "2014-05-30", "Pfingstferien 2014"),
		new Holiday("2014-12-22", "2015-01-05", "Weihnachtsferien 2014")

		]
	}]
}