.packageName <- "fBasics"

# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#     iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#     General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#   sources obtained from a few dozens of websites  


################################################################################
# FUNCTIONS:            DESCRIPTION:
#  economagicImport      Downloads market data from EconoMagic's web site
#  yahooImport           Downloads market data from Yahoo's web site 
#  keystatsImport        Downloads key statistics from Yahoo's web site
################################################################################


economagicImport =
function (file = "tempfile", 
source = "http://www.economagic.com/em-cgi/data.exe/", 
query, frequency = c("quarterly", "monthly", "daily"), 
save = FALSE, colname = "VALUE", try = TRUE)
{   # A function implemented by Diethelm Wuertz
    
    # Notes:
    #   Note, only the first column is returned, the remaining are  
    #     usually percentual changes which can be calculated otherwise.
    #   Required Functions:
    #     fields() cuts a string in fields
    
    # Examples:
    #   USDEUR Foreign Exchange Rate:
    #   import.data.economagic("USDEUR.CSV", query = "fedny/day-fxus2eu", 
    #       frequency="daily", save=TRUE, colname="USDEUR")
    #   USFEDFUNDS US FedFunds Rate:
    #   import.data.economagic("USFEDFUNDS.CSV", query = "fedstl/fedfunds+2", 
    #       frequency="monthly", save=TRUE, colname="USFEDFUNDS")
    #   USDGNP:
    #   import.data.economagic("USGNP.CSV", query = "fedstl/gnp", 
    #       frequency="quarterly", save=TRUE, colname="USGNP")

    # FUNCTION:
    
    # Download:
    if (try) {
        z = try(economagicImport(file = file, source = source, 
            query = query, frequency = frequency, 
            save = save, colname = colname, try = FALSE)) 
        if (class(z) == "try-error") {
            print("No Internet Access")
            return(NULL) }
        else {
            return(z) }}    
    else {
        # Internal Function:
        fields = 
        function (x, rm.spaces= TRUE, ignore.quotes = TRUE, sep = ",") {
            # Remove White Spaces:
            if(rm.spaces) { 
                p = nchar(x); result = NULL
                while (p > 0) {
                    p =regexpr("\ ", x); x1 =substring(x, 1, p-1)
                    x2 =substring(x, p+1); x =paste(x1 ,x2, sep="")}}   
            # Ignore Quotation Marks:
            if(ignore.quotes) { 
                p = nchar(x); result = NULL
                while (p > 0) {
                    p =regexpr('\"', x); x1 =substring(x, 1, p-1)
                    x2 =substring(x, p+1); x =paste(x1, x2, sep="")}}   
            # Retrieve Individual Fields:
            sep = paste("\\", sep, sep="")
            p = nchar(x); result = NULL
            while (p > 0) {
                p = regexpr(sep,x); add =substring(x, 1, p-1)
                x = substring(x, p+1)
                if (p > 0) result = c(result, add)
                else result = c(result, x)}
            # Return Value:
            result }
        
        # Settings:
        if (length(frequency) == 4) stop("Define frequency value")
        if (frequency == "quarterly" || frequency == "monthly") n =2
        if (frequency == "daily") n =3
        if (n == 0) stop("no valid frequency value")
       
        # Download the file:
        download.file(url = paste(source, query, sep = ""), destfile = file)
    
        # Extract all the data records:
        lines = grep("font color=white", scan(file, what = "", sep = "\n", 
            quiet = TRUE))
        
        # Build the data table z:
        z = scan(file, what = "", sep = "\n", quiet = TRUE)[lines]
        z = gsub("font", "          ", x=z)         # remove irrelevant strings
        z = gsub("<", " ", x=z)                     # remove irrelevant strings
        z = gsub(">", " ", x=z)                     # remove irrelevant strings
        z = gsub("color=white........", " ", x=z)   # remove irrelevant strings
        for (i in 1:15) { z =gsub("  ", " ", x=z)}  # remove double blank spaces
        for (i in 1:n) { z =sub(" ", "", x=z)}      # link date together
        z = sub(" $", "", perl=TRUE, x=z)           # remove trailing spaces
        n.rows =length(z)                           # count records
        z = as.numeric(fields(z, rm.spaces = FALSE, sep = " "))
        n.fields =length(z)     
        z = matrix(z, ncol = n.fields/n.rows)       # create matrix
        
        # Create the dates in ISO-8601 format:
        # For quarterly data multiplay quarters by 3 to get monthly base
        if (frequency == "quarterly") z[,1] =100*(z[,1]%/%100)+3*z[,1]%%100
        z = data.frame(cbind(z[,1], z[,2]))
        znames = as.character(1:(length(names(z)) - 1))
        names(z) = c("DATE", colname)   
        
        # Save to file:
        if (save) {
            write.table(z, file, quote = FALSE, sep = ",", row.names = FALSE) }
        else {
            unlink(file) }
        
        # Return Value:
        return(z)
    }
    
    # Return Value:
    invisible()
}


# ------------------------------------------------------------------------------


yahooImport = 
function (file = "tempfile", source = "http://chart.yahoo.com/table.csv?", 
query, save = FALSE, try = TRUE)
{   # A function implemented by Diethelm Wuertz

    # Example:
    #   IBM SHARES, test 19/20 century change 01-12-1999 -- 31-01-2000:
    #   import.data.yahoo("IBM.CSV", 
    #     query = "s=IBM&a=11&b=1&c=1999&d=0&q=31&f=2000&z=IBM&x=.csv", 
    #   save=TRUE)

    # Notes:
    #   Requires: fields() cuts a string in fields
    #   Yahoo Token Description:           
    #   s     Selected Ticker-Symbol
    #   a     First Quote starts with Month (mm): 0-11, Jan-Dec
    #   b     First Quote starts with Day (dd)
    #   c     First Quote starts with Year: as CCYY
    #   d     Last Quote ends with Month (mm): 0-11, Jan-Dec
    #   e     Last Quote ends with Day (dd)
    #   f     Last Quote ends with Year (yy): as CCYY
    #   z     Selected Ticker-Symbol

    # FUNCTION:
    
    # Download:
    if (try) {
        z = try(yahooImport(file = file, source = source, 
            query = query, save = save, try = FALSE))
        if (class(z) == "try-error") {
            print("No Internet Access")
            return(NULL) }
        else {
            return(z) }}    
    else {
        # Internal Function:
        fields = 
        function (x, rm.spaces = TRUE, ignore.quotes = TRUE, sep = ",") {
            options(warn=-1)
            # Remove White Spaces:
            if(rm.spaces) { 
                p = nchar(x); result = NULL
                while (p > 0) {
                    p = regexpr("\ ", x); x1 = substring(x, 1, p-1)
                    x2 = substring(x, p+1); x = paste(x1 ,x2, sep = "")}}   
            # Ignore Quotation Marks:
            if(ignore.quotes) { 
                p = nchar(x); result = NULL
                while (p > 0) {
                    p = regexpr('\"', x); x1 = substring(x, 1, p-1)
                    x2 = substring(x, p+1); x = paste(x1, x2, sep = "")}}   
            # Retrieve Individual Fields:
            sep = paste("\\", sep, sep="")
            p = nchar(x); result = NULL
            while (p > 0) {
                p = regexpr(sep,x); add = substring(x, 1, p-1)
                x = substring(x, p+1)
                if (p > 0) result = c(result, add)
                else result = c(result, x)}
            # Return Value:
            result }
            
        # Download the file:
        download.file(url = paste(source, query, sep = ""), destfile = file)
         
        # Get the names from the first line and cut it in fields,
        # Use the function fields() from fBasics:
        znames = fields(scan(file = file, n = 1, quiet = TRUE, 
            what = "", sep = "\n"))
        
        # Get the data records, starting in the second line:
        z = scan(file, quiet = TRUE, what = "", skip = 1, sep = ",")
        
        # Transform the data to matrix form:
        z = matrix(data = z, byrow = TRUE, ncol = length(znames))
        
        # Remove the last it's a comment !?
        z = z[-dim(z)[1], ]
        
        # Write the date in ISO-8601 format as CCYYMMDD,
        mm = 1:12
        names(mm) = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", 
                      "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
        r = matrix(fields(z[, 1], sep = "-"), byrow = FALSE, ncol = 3)
        r[, 2] = mm[r[, 2]]
        r = matrix(as.numeric(r), byrow = FALSE, ncol = 3)
        # Add Century: Sorry works only up to 2010:
        z[,1 ] = (1950 + 50*(sign(10-r[, 3])) + r[, 3])*10000 + 
            r[, 2]*100 + r[, 1]
        
        # Build the data table z:
        z = data.frame(z)
        names(z) = znames
        for (i in 1:length(znames)) z[, i] = rev(z[, i])
        
        # Write table to file:
        if (save) {
            write.table(z, file, quote = FALSE, sep = ",", row.names = FALSE) }
        else {
            unlink(file) }
        
        # Return Value:
        return(z)
    }
    
    # Return Value:
    invisible()
}
    

# ------------------------------------------------------------------------------



  	
keystatsImport = 
function(file = "tempfile", source = "http://finance.yahoo.com/q/ks?s=", 
query, save = FALSE, try = TRUE) 
{	# A function implemented by Diethelm Wuertz

	# Description 
	#	Downloads Key Statistics on shares from Yahoo's Internet site
	# 
	# Example:
	#	keystatsImport("YHOO")
	
	# FUNCTION:
	
	# Download:
	if (try) {
		# Try for Internet Connection:
        z = try(keystatsImport(file = file, source = source, 
            query = query, save = save, try = FALSE))
        if (class(z) == "try-error") {
            print("No Internet Access")
            return(NULL) }
        else {
            return(z) } }
    else {                 
	    offset = 2
	    url = paste(source, query, sep = "")
	    download.file(url, file)
	    x = scan(file, what = "", sep = ">")
	    keynames = c(
	        "Market Cap ", 
	        "Enterprise Value ",
	        "Trailing P/E ",
	        "Forward P/E ",
	        "PEG Ratio ",
	        "Price/Sales ",
	        "Price/Book ",
	        "Enterprise Value/Revenue ",
	        "Enterprise Value/EBITDA ",
	        "Annual Dividend:",
	        "Dividend Yield:",
	        "Beta:",
	        "52-Week Change:",
	        "52-Week High ",
	        "52-Week Low " )
	    stats = as.character(Sys.Date())
	    for (s in keynames) {
		    grepped = paste(sub("</td", "", x[grep(s, x) + offset]))
			stats = c(stats, grepped)}
		for (i in 1:length(keynames))
			keynames[i] = substr(keynames[i], 1, nchar(keynames[i])-1)
		keynames = c("Date", keynames)       
	    # Return Value:
	    data.frame(cbind(Keyname = keynames, Statistic = stats)) }
}
    
    
# ------------------------------------------------------------------------------
  
  
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#	  iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#	  General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#	sources obtained from a few dozens of websites 	


################################################################################
# FUNCTION:		   		DESCRIPTION:
#  skewness	   			 Returns a number which is the skewness of the data
#   skewness.default
#   skewness.data.frame
#   skewness.POSIXct
#   skewness.POSIXlt
#  kurtosis	   			 Returns a number which is the kurtosis of the data
#   kurtosis.default
#   kurtosis.data.frame
#   kurtosis.POSIXct
#   kurtosis.POSIXlt
#  basicStats	   		 Returns a basic statistics summary
# FUNCTION:             DESCRIPTION:
#  rowStats		 		 Computes sample statistics by row
#   rowAvgs				  Computes sample mean by row
#   rowVars			 	  Computes sample variance by row
#   rowStdevs			  Computes sample variance by row
#   rowSkewness		 	  Computes sample skewness by row
#   rowKurtosis		 	  Computes sample kurtosis by row
#   rowCumsums		 	  Computes sample cumulated sums by row
# FUNCTION:             DESCRIPTION:
#  colStats		 		 Computes sample statistics by column
#   colAvgs				  Computes sample mean by column
#   colVars			 	  Computes sample variance by column
#   colStdevs			  Computes sample variance by column
#   colSkewness		 	  Computes sample skewness by column
#   colKurtosis		 	  Computes sample kurtosis by column
#   colCumsums		 	  Computes sample cumulated sums by column
################################################################################


kurtosis =
function (x, ...) 
{	# A function implemented by D. Wuertz

	# FUNCTION:
	
	UseMethod("kurtosis")
}


kurtosis.default =
function (x, na.rm = FALSE, ...) 
{	# A function implemented by D. Wuertz
  
  	# Description:
	#	Returns the value of the kurtosis of a
  	#	distribution function. Missing values
  	#	can be handled.
	
	# FUNCTION:
    
	# Warnings:
	if (!is.numeric(x) && !is.complex(x) && !is.logical(x)) {
        warning("argument is not numeric or logical: returning NA")
        return(as.numeric(NA))}
        
    # Remove NAs:
    if (na.rm) x = x[!is.na(x)]

    # Kurtosis:
    n = length(x)
    if (is.integer(x)) x = as.numeric(x) 
    kurtosis = sum((x-mean(x))^4/var(x)^2)/length(x) - 3
    
    # Return Value:
    kurtosis  
}


# ------------------------------------------------------------------------------


kurtosis.data.frame = 
function (x, ...) 
{	# A function implemented by D. Wuertz

	sapply(x, kurtosis, ...)
}


# ------------------------------------------------------------------------------


kurtosis.POSIXct =
function (x, ...) 
{	# A function implemented by D. Wuertz

	structure(kortosis(unclass(x), ...), class = c("POSIXt", "POSIXct"))
}


# ------------------------------------------------------------------------------


kurtosis.POSIXlt =
function (x, ...) 
{	# A function implemented by D. Wuertz

	as.POSIXlt(kurtosis(as.POSIXct(x), ...))
}


# ------------------------------------------------------------------------------


skewness =
function (x, ...) 
{	# A function implemented by D. Wuertz

	UseMethod("skewness")
}


# ------------------------------------------------------------------------------

skewness.default =
function (x, na.rm = FALSE, ...) 
{	# A function implemented by D. Wuertz
  
  	# Description:
	#	Returns the value of the skewness of a
  	#	distribution function. Missing values
  	#	can be handled.
	
	# FUNCTION:
    
	# Warnings:
	if (!is.numeric(x) && !is.complex(x) && !is.logical(x)) {
        warning("argument is not numeric or logical: returning NA")
        return(as.numeric(NA))}
        
    # Remove NAs:
    if (na.rm) x = x[!is.na(x)]

    # Skewness:
    n = length(x)
    if (is.integer(x)) x = as.numeric(x) 
    skewness = sum((x-mean(x))^3/sqrt(var(x))^3)/length(x)
    
    # Return Value:
    skewness  
}


# ------------------------------------------------------------------------------


skewness.data.frame = 
function (x, ...) 
{	# A function implemented by D. Wuertz

	sapply(x, skewness, ...)
}


# ------------------------------------------------------------------------------


skewness.POSIXct =
function (x, ...) 
{	# A function implemented by D. Wuertz

	structure(skewness(unclass(x), ...), class = c("POSIXt", "POSIXct"))
}


# ------------------------------------------------------------------------------


skewness.POSIXlt =
function (x, ...) 
{	# A function implemented by D. Wuertz

	as.POSIXlt(skewness(as.POSIXct(x), ...))
}


# ******************************************************************************


basicStats = 
function(x, ci = 0.95) 
{	# A function implemented by D. Wuertz
	
	# Description:
	#	Calculates Basic Statistics
	
	# FUNCTION:
	
	# CL Levels:	
	cl.vals = function(x, ci){
		x = x[!is.na(x)]
		n = length(x)
		if(n <= 1) return(c(NA, NA))
		se.mean = sqrt(var(x)/n)
		t.val = qt((1 - ci)/2, n - 1)
		mn = mean(x)
		lcl = mn + se.mean * t.val
		ucl = mn - se.mean * t.val
		c(lcl, ucl)}		
	
	# Observations:
	x.length = length(x)
	x = x[!is.na(x)]
	x.na = x.length - length(x)
	
	# Basic Statistics:
	z = c(
		x.length, x.na, min(x), max(x),
		as.numeric(quantile(x, prob=0.25, na.rm=TRUE)),	
		  as.numeric(quantile(x, prob=0.75, na.rm=TRUE)), 
		mean(x), median(x), sum(x), sqrt(var(x)/length(x)), 
		cl.vals(x, ci)[1], cl.vals(x, ci)[2], var(x), 
		sqrt(var(x)), skewness(x), kurtosis(x) )	
	
	# Row Names:
	 znames = c(
		"nobs", "NAs", 	"Minimum", "Maximum", 
		"1. Quartile", 	"3. Quartile", 	"Mean",	"Median", 
		"Sum", 	"SE Mean", "LCL Mean", "UCL Mean", 
		"Variance", "Stdev", "Skewness", "Kurtosis")
		
	# Output as data.frame
	ans = data.frame(z, row.names = znames)
	
	# Return Value:
	ans
	
}


# ******************************************************************************


rowStats = 
function(x, FUN, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample statistics by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN = 1, FUN = FUN, ...) 
	else
		result = apply(x, MARGIN = 1, FUN = FUN, ...) 
		
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


rowAvgs = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample mean by column
	
	# Note:
	#	R's base package comes already with a colMeans!
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN = 1, FUN = mean, ...) 
	else
		result = apply(x, MARGIN = 1, FUN = mean, ...) 
		
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


rowVars = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample variance by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN = 1, FUN = var, ...) 
	else
		result = apply(x, MARGIN = 1, FUN = var, ...) 
		
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


rowStdevs = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample standard deviation by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = sqrt(apply(na.remove(x), MARGIN = 1, FUN = var, ...))
	else
		result = sqrt(apply(x, MARGIN = 1, FUN = var, ...))
		
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


rowSkewness = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample skewness by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN = 1, FUN = skewness, ...) 
	else
		result = apply(x, MARGIN = 1, FUN = skewness, ...) 
		
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


rowKurtosis = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample kurtosis by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN = 1, FUN = kurtosis, ...) 
	else
		result = apply(x, MARGIN = 1, FUN = kurtosis, ...) 
		
	# Return Value:
	result 
}


# ------------------------------------------------------------------------------


rowCumsums = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample cumulated sums by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN = 2, FUN = cumsum, ...) 
	else
		result = apply(x, MARGIN = 2, FUN=cumsum, ...) 
		
	# Return Value:
	result 
}


# ******************************************************************************


colStats = 
function(x, FUN, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample statistics by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN=2, FUN=FUN, ...) 
	else
		result = apply(x, MARGIN=2, FUN=FUN, ...) 
		
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


colAvgs = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample mean by column
	
	# Note:
	#	R's base package comes already with a colMeans!
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN = 2, FUN = mean, ...) 
	else
		result = apply(x, MARGIN = 2, FUN = mean, ...) 
		
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


colVars = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample variance by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN = 2, FUN = var, ...) 
	else
		result = apply(x, MARGIN = 2, FUN = var, ...) 
		
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


colStdevs = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample standard deviation by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = sqrt(apply(na.remove(x), MARGIN = 2, FUN = var, ...))
	else
		result = sqrt(apply(x, MARGIN = 2, FUN = var, ...))
		
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


colSkewness = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample skewness by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN = 2, FUN = skewness, ...) 
	else
		result = apply(x, MARGIN = 2, FUN = skewness, ...) 
		
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


colKurtosis = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample kurtosis by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN = 2, FUN = kurtosis, ...) 
	else
		result = apply(x, MARGIN = 2, FUN = kurtosis, ...) 
		
	# Return Value:
	result 
}


# ------------------------------------------------------------------------------


colCumsums = 
function(x, na.rm = FALSE, ...) 
{ 	# A function implemented by Diethelm Wuertz

	# Description:
	# 	Computes sample cumulated sums by column
	
	# FUNCTION:
	
	# Column Statistics:
	if (na.rm) 
		result = apply(na.remove(x), MARGIN = 2, FUN = cumsum, ...) 
	else
		result = apply(x, MARGIN = 2, FUN=cumsum, ...) 
		
	# Return Value:
	result 
}


# ******************************************************************************


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#     iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#     General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#   sources obtained from a few dozens of websites


################################################################################
# FUNCTION:             DESCRIPTION:    
#  splusLikePlot         Sets parameters that plots look more Splus like
#  tsPlot                Returns a time series plot
#  histPlot              Returns a histogram plot
#  densityPlot           Returns a kernel density estimate plot
#  logpdfPlot            Returns a pdf plot on logarithmic scale(s)
#  qqgaussPlot           Returns a Gaussian Quantile-Quantile plot
#  scalinglawPlot        Evaluates and displays a scaling law behavior
# FUNCTION:             DESCRIPTION 3D PLOTS:
#  circlesPlot           Returns a scatterplot of circles indexing a 3rd variable
#  perspPlot             Returns a perspective plot in 2 dimensions
# FUNCTION:             DESCRIPTION PLOT TOOLS:
#  characterTable        Shows a table of character's numerical equivalents 
#  plotcharacterTable    Shows a table of plot characters and symbols
#  colorTable            Shows a table of plot color codes
################################################################################

 
splusLikePlot = 
function(scale = 0.8)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Sets parameters that plots look more Splus like
    
    # Arguments:
    #   cex.axis - The magnification to be used for axis annotation
    #       relative to the current.
    #   cex.lab - The magnification to be used for x and y labels relative
    #       to the current.
    #   cex.main - The magnification to be used for main titles relative
    #       to the current.
    #   cex.sub - The magnification to be used for sub-titles relative to
    #       the current.
    
    # Note: 
    #   * Scales plotting text and symbols relative to the default
    #     so that plots look more SplusLike.    
    #   * Further parameters will be added in the future.

    # FUNCTION::fBasics
    
    # Set par:
    par(cex.axis = scale, cex.lab = scale, cex.main = scale, cex.sub = scale)
    
    # Return value:
    invisible()
}


# ------------------------------------------------------------------------------


tsPlot = 
function(x, type = "l", labels = TRUE, ...) 
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Returns a time series plot
    
    # FUNCTION:
    
    # Settings:
    # if (SPLUSLIKE) splusLikePlot(TRUE)
    
    # Labels:
    if (labels) {
        xlab = "t"
        ylab = "x"
        main = paste ("Series: ", substitute(x))
        col = "steelblue4" }
    else {
        xlab = ""
        ylab = ""
        main = ""}
            
    # Plot:
    if (is.null(dim(x))) {
        if (labels) {
            ts.plot(x = x, type = type, col = col, 
                xlab = xlab, ylab = ylab, main = main, ...) 
            grid() }
        else {
            ts.plot(x = x, type = type,
                xlab = xlab, ylab = ylab, main = main, ...) }}
    else { 
        if (labels) {
            ts.plot(x = x,
                xlab = xlab, ylab = ylab, main = main, ...) 
            grid() }
        else {
            ts.plot(x = x, ...) } }
            
    # Return Value:
    invisible(x)
}
     
   
# ------------------------------------------------------------------------------


histPlot = 
function(x, col = "steelblue4", border = "white", ...) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Returns a histogram plot
    
    # FUNCTION:
    
    # Settings:
    # if (SPLUSLIKE) splusLikePlot(TRUE)
    
    # Histogram Plot:
    ans = hist(x = x, col = col, border = border, ...) 
    
    # Return Value:
    ans
}  


# ------------------------------------------------------------------------------


densityPlot = 
function(x, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Returns a kernel density estimate plot

    # FUNCTION:
    
    # Settings:
    # if (SPLUSLIKE) splusLikePlot(TRUE)
    doplot = TRUE
    
    # Plot:
    if (doplot) {
        return(plot(density(x), ...)) }
    else {
        return(density(x, ...)) }
    
    # Return Value:
    invisible()
}


# ------------------------------------------------------------------------------


logpdfPlot = 
function(x, n = 50, doplot = TRUE, type = c("lin-log", "log-log"), ...)
{   # A function implemented by D. Wuertz
    
    # Description:
    #   Returns a pdf plot on a lin-log scale in
    #   comparisin to a Gaussian density plot
    #   and return the break-midpoints and the
    #   counts obtained from the histogram of
    #   the empirical data.
    
    # FUNCTION:
    
    # Settings:
    # if (SPLUSLIKE) splusLikePlot(TRUE)
    
    # Select Type:
    type = type[1]
    
    # Internal Function Log-LogPlot:
    loglogpdfPlot = function(x, n = 50, doplot = TRUE, ...) {
        # Internal FUNCTION:
        .hist = function(x, cells="FD", include.lowest=FALSE) { result = 
            hist(x, breaks=cells, include.lowest=include.lowest, plot=FALSE)
            prob.counts = result$counts/sum(result$counts) /
                diff(result$breaks)[1]
            list(breaks=result$breaks, counts=prob.counts) }
        # Histogram Count & Breaks:
        histogram = .hist(x, cells="fd", include.lowest=FALSE)
            yh = histogram$counts; xh = histogram$breaks
            xh = xh[1:(length(xh)-1)] + diff(xh)/2
            xh = xh[yh > 0]; yh = yh[yh > 0]
            yh1 = yh[xh < 0]; xh1 = abs(xh[xh < 0])
            yh2 = yh[xh > 0]; xh2 = xh[xh > 0]
            plot(log(xh1), log(yh1), type="p", ...) 
            par(err=-1); points(log(xh2), log(yh2), col=2) 
        # Compare with a Gaussian plot:
        xg = seq(from=min(xh1[1], xh[2]), 
            to=max(xh1[length(xh1)], xh2[length(xh2)]), length=n)
        xg = xg[xg > 0]
            yg = log(dnorm(xg, mean(x), sqrt(var(x))))
        par(err=-1); lines(log(xg), yg, col=3)
        # Return Value:
        invisible(list(breaks = c(xh1, xh2), counts = c(yh1, yh2), 
            fbreaks=c(-rev(xg), xg), fcounts=c(-rev(yg), yg))) }
        
    # Internal FUNCTION:
    .hist = function(x, cells="FD", include.lowest=FALSE) { 
        result = hist(x, breaks = cells, include.lowest = include.lowest, 
            plot = FALSE)
        prob.counts = result$counts/sum(result$counts)/diff(result$breaks)[1]
        list(breaks = result$breaks, counts = prob.counts) }

    # Lin-Log Plot:
    if (type == "lin-log") {
        # Histogram Count & Break-Midpoints:
        histogram = .hist(x, cells = "FD", include.lowest = FALSE)
            yh = histogram$counts
            xh = histogram$breaks
            xh = xh[1:(length(xh)-1)] + diff(xh)/2
            xh = xh[yh>0]
            yh = log(yh[yh > 0])
            if (doplot) {
                par(err=-1)
                plot(xh, yh, type = "p", ...)} 
        # Compare with a Gaussian Plot:
        xg = seq(from = xh[1], to = xh[length(xh)], length = n)
            yg = log(dnorm(xg, mean(x), sqrt(var(x))))
            if (doplot) { 
                par(err=-1)
                lines(xg, yg, col=2)}
        # Result:
        result = invisible(list(breaks = xh, counts = yh, 
            fbreaks = xg, fcounts = yg))}
    
    # Log-Log Plot:
    if (type == "log-log") {
        result = loglogpdfPlot(x = x, n = n, doplot = doplot, ...) }
    
    # Return Value:
    result
}


# ------------------------------------------------------------------------------


qqgaussPlot = 
function(x, span = 5, ...)
{   # A function implemented by D. Wuertz
    
    # Description:
    #   Returns a Quantile-Quantile plot.

    # FUNCTION:
    
    # Settings:
    # if (SPLUSLIKE) splusLikePlot(TRUE)
    
    # Standardized qqnorm():
    y = (x-mean(x)) / sqrt(var(x))
    lim = c(-span, span)
    qqnorm(y[abs(y) < span], xlim = lim, ylim = lim, ...)
    
    # Return Value:
    invisible(qqline(y, col = 2))
}


# ------------------------------------------------------------------------------


scalinglawPlot =
function(x, span = ceiling(log(length(x)/252)/log(2)), doplot = TRUE, ...)
{   # A function implemented by D. Wuertz
  
    # Description:
    #   Investigates the scaling law.
    #   The input "x" requires log-returns.

    # FUNCTION: 
    
    # Settings:
    # if (SPLUSLIKE) splusLikePlot(TRUE)
    logtimesteps = span
    xmean = mean(x)
    
    # x have to be logarithmic returns
    y = (x-xmean)
    logprices = cumsum(y)
    
    # Scaling Power Low:
    scale = function (nx, logprices) {
        sum(abs(diff(logprices, lag = (2^nx))))}
        
    nx = 0:logtimesteps; x = nx*log(2)
    y = log(apply(matrix(nx), 1, scale, logprices))
    fit = lsfit(x, y)$coefficients
    # Robust Fit:       
    # fit = l1fit(x, y)$coefficients
    alfa = 1.0/fit[2]
    if (doplot) { 
        plot(x, y, xlab = "log-time", ylab = "log-volatility", ...)
        title(main = "Scaling Law Plot", ...)
        grid()
        abline(fit[1], fit[2], col=2)
        abline(fit[1], 0.5, col=3) }
    
    # Return Value:
    list(exponent = as.numeric(alfa), fit = fit)
}


# ******************************************************************************


circlesPlot = 
function(x, y, size = 1, ...)
{   # A function implemented by GKS
    
    # Description:  
    #   Creates a scatterplot with circle size indexing a 
    #   third variable.
    
    # Example:
    #   circlesPlot(x = rnorm(50), y = rnorm(50), size = abs(rnorm(50)))

    # FUNCTION:
    
    # Settings:
    # if (SPLUSLIKE) splusLikePlot(TRUE)
    
    # Circle Plot:
    plot(x, y, type = "n", ...)
    symbols(x, y, add = TRUE, circles = sqrt(size), inches = 0.25, ...)
    
    # Return Value:
    invisible()
}


# ------------------------------------------------------------------------------


perspPlot = 
function(x, y, z, theta = -40, phi = 30, col = "steelblue4", ps = 9, ...) 
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Returns a perspecvtive plot
    
    # FUNCTION:
    
    # Settings:
    # if (SPLUSLIKE) splusLikePlot(TRUE)
    
    # Perspective Plot:
    par(ps = ps)
    if (!exists("ticktype")) ticktype = "detailed"
    if (!exists("expand")) expand = 0.6
    if (!exists("r")) r = 500
    
    # Return Value:
    persp(x = x, y = y, z = z, theta = theta, phi = phi, 
        col = col, ticktype = ticktype, expand = expand, ...) 
}

                        
# ******************************************************************************


characterTable = 
function(font = 1, cex = 0.7) 
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Prints numeric equivalents to all latin characters.

    # Notes:
    #   The printed version doesn't allways corresponds to the 
    #   screen display. The character on line "xy" and column 
    #   "z" of the table has code "xyz". These codes can be 
    #   used as any other characters. 
    #     e.g. title("\347\340 et \340")
    #   Note on S:
    #   As the command line window of Splus can't print special 
    #   characters 
    #     cat("\347\340 et \340") 
    #   will not print the special characters, at least under 
    #   4.5 and under 2000.
    
    # Author:
    #   Source from Pierre Joyet, pierre.joyet@bluewin.ch

    # Example:
    #   for ( i in 1:20) characterTable(font = i)

    # FUNCTION:
    
    # Settings:
    v = 40:377
    v = v[v %% 100 < 80 & v %% 10 < 8]
    par(mar = c(5, 5, 4, 2) + 0.1)
    plot(-1:7, seq(4, 33, length = 9), type = "n", axes = FALSE, 
        xlab = "", ylab = "", cex = cex, main = "Table of Characters")
    k = 1
    for(i in 4:31)
        for(j in 0:7) {
            text(j, 35 - i, eval(parse(text = paste("\"\\", v[k], "\"",
                    sep = ""))), font = font, cex = cex)
            k = k + 1 }
    
    text(0:7, rep(33, 7), as.character(0:7), font = 3, cex = cex)
    text(rep(-1, 28), 31:4, as.character(c(4:7, 10:17, 20:27, 
        30:37)), font = 3, cex = cex)
    
    # Return Value:
    invisible()
}


# ------------------------------------------------------------------------------


colorTable = 
function(cex = 0.7) 
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Displays a table of plot colors.
    
    # Author:
    #   Unknown:
    
    # Example:
    #   colorTable()

    # FUNCTION:
    
    # Plot:
    plot(0, 0, xlim = c(-1, 10), ylim = c(0, 10), type = 'n', axes = FALSE, 
        xlab = '', ylab = '', cex = cex, main = "Table of Color Codes")
    j = -1
    for(i in 0:99) {
        if(i %% 10 == 0) {j = j+1; k = 10}
        k = k-1
        points(j, k, pch = 15, col = i, cex = 2)
        text(j+0.45, k, i, cex = cex)}
    
    # Return Value:
    invisible()
}


# ------------------------------------------------------------------------------


plotcharacterTable = 
function(font = par('font'), cex = 0.7) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Shows a table of plot characters.
    
    # Example:
    #   plotcharacterTable()
    
    # Author:
    #   Unknown.

    # FUNCTION:
    
    # Compute:
    plot(0, 0, xlim = c(-1, 11), ylim = c(0, 26), type = 'n', 
        axes = FALSE, xlab = '', ylab = '', main = "Table of Plot Characters")
    j = -1
    for(i in 0:255) {
        if(i %% 25 == 0) {j = j+1; k = 26}
        k = k-1
        points(j, k, pch = i, font = font, cex = cex, col = 2)
        text(j+0.50, k, i, cex = cex) }
    
    # Return Value:
    invisible()
}


# ------------------------------------------------------------------------------


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#	  iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#	  General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#	sources obtained from a few dozens of websites


################################################################################
# FUNCTION:		   		DESCRIPTION:		
#  dhyp		   		     Returns density for hyperbolic DF
#   phyp		   		  Returns probability for hyperbolic DF
#   qhyp		   		  Returns quantiles for hyperbolic DF
#   rhyp		   	      Returns random variates for hyperbolic DF
#  dnig		   		     Returns density for inverse Gaussian DF
#   pnig		   	      Returns probability for for inverse Gaussian DF
#   qnig		   		  Returns quantiles for for inverse Gaussian DF 
#   rnig		   	      Returns random variates for inverse Gaussian DF
################################################################################


dhyp = 
function (x, alpha = 1, beta = 0, delta = 1, mu = 0)
{	# A function implemented by Diethelm Wuertz
	
  	# Description:
	#	Return Hyperbolic Density Function PDF:
   	   
	# Arguments:
	#	|beta| <= alpha  - Shape Parameters
	#	0 <= delta       - Scale Parameter
	#	mu               - Location Parameter
	 
	# FUNCTION:
   	
	# Density:
	efun = exp( -alpha*sqrt(delta^2 + (x-mu)^2) + beta*(x-mu) )
	sqr = sqrt(alpha^2-beta^2)
	prefac = sqr / ( 2 * alpha * delta * besselK(delta*sqr, nu = 1) )
	ans = prefac * efun

	# Return Value:
    ans
}

  
# ------------------------------------------------------------------------------


phyp = 
function(q, alpha = 1, beta = 0, delta = 1, mu = 0, ...)
{	# A function implemented by Diethelm Wuertz

  	# Description:
	#	Return cumulative probability of Hyperbolic PDF:
  	 
	# Arguments:
	#	|beta| <= alpha  - Shape Parameters
	#	0 <= delta       - Scale Parameter
	#	mu               - Location Parameter

	# Function:
	
	# Cumulative Probability:
	ans = NULL
	for (Q in q) {
		ans = c(ans, integrate(dhyp, -Inf, Q, stop.on.error = FALSE, 
			alpha = alpha, beta = beta, delta = delta, mu = mu, ...)$value ) }

	# Return Value:
	ans
}


# ------------------------------------------------------------------------------


qhyp = 
function(p, alpha = 1, beta = 0, delta = 1, mu = 0)
{	# A function implemented by Diethelm Wuertz

	# Description:

	# Note:
	#	This procedure will not run under Splus.

	# FUNCTION:
	
	# Settings:
	maxiter = 10000
	tol = .Machine$double.eps^0.25
	
	# Internal Functions:
	myUniroot <-
	function (f, lower, upper, tol, maxiter, ...) {
		if (f(lower, ...) * f(upper, ...) >= 0) root = NA
		else root = .Internal(zeroin(function(arg) f(arg, ...), 
			lower, upper, tol, as.integer(maxiter)))[1]
		root }		
	froot = 
	function(x, alpha, beta, delta, p) {
		phyp(q=x, alpha=alpha, beta=beta, delta=delta, mu=0) - p }
	
	# Loop over all p's:			
	result = NULL	
	for (pp in p) {
		lower = -1
		upper = +1			
		counter = 0
		iteration = NA
		while (is.na(iteration)) {
			iteration = myUniroot(f=froot, lower=lower, upper=upper, tol=tol, 
				maxiter=maxiter, alpha=alpha, beta=beta, delta=delta, p=pp)
			counter = counter + 1
			lower = lower-2^counter
			upper = upper+2^counter}		
		result = c(result, iteration) }
			
	# Return Value:
	result + mu
}	


# ------------------------------------------------------------------------------


rhyp = 
function (n, alpha = 1, beta = 0, delta = 1, mu = 0)
{	# A function implemented by Diethelm Wuertz
	
  	# Description:
	#	Returns random deviates of Hyperbolic PDF:
  	
	# Arguments:
	#	|beta| <= alpha  - Shape Parameters
	#	0 <= delta       - Scale Parameter
	#	mu               - Location Parameter
	
	# Source:
	#	I have removed my original Fortran program and replaced it by
	# 	the dhyperb() function from the HyperbolicDist Package, written
	#   by David Scott, Ai-Wei Lee, Jennifer Tso, Richard Trendall 
	
	# FUNCTION:
	
	# Internal Function:
  	rhyperb = function (n, theta) {
	    hyp.pi = theta[1]
	    zeta = theta[2]
	    delta = theta[3]
	    mu = theta[4]
	    alpha = as.numeric(.hyperb.change.pars(1, 2, theta))[1] * delta
	    beta = as.numeric(.hyperb.change.pars(1, 2, theta))[2] * delta
	    phi = as.numeric(.hyperb.change.pars(1, 3, theta))[1] * delta
	    gamma = as.numeric(.hyperb.change.pars(1, 3, theta))[2] * delta
	    theta.start = -sqrt(phi * gamma)
	    t = -sqrt(gamma/phi)
	    w = sqrt(phi/gamma)
	    delta1 = exp(theta.start)/phi
	    delta2 = (w - t) * exp(theta.start)
	    delta3 = exp(-gamma * w)/gamma
	    k = 1/(delta1 + delta2 + delta3)
	    r = k * delta1
	    v = 1 - k * delta3
	    output = numeric(n)
	    need.value = TRUE
	    for (i in 1:n) {
	        while (need.value == TRUE) {
	            U = runif(1)
	            E = rexp(1)
	            if (U <= r) {
	                x = 1/phi * log(phi * U/k)
	                if (E >= alpha * (sqrt(1 + x^2) + x)) {
	                  need.value = FALSE } }
	            if ((U > r) & (U <= v)) {
	                x = t - 1/phi + U * exp(-theta.start)/k
	                if (E >= alpha * sqrt(1 + x^2) - beta * x + theta.start) {
	                  need.value = FALSE
	                } }
	            if (U > v) {
	                x = 1/gamma * log(k/gamma) - 1/gamma * log(1 - U)
	                if (E >= alpha * (sqrt(1 + x^2) - x)) {
	                  need.value = FALSE } } }
	        output[i] = delta * x + mu
	        need.value = TRUE }
	    output }
	    
	# Internal Function:
	.hyperb.change.pars = function (from, to, theta) {
	    delta <- theta[3]
	    mu <- theta[4]
	   	hyperb.pi <- theta[1]
	    zeta <- theta[2] 
	    if (from == 1 && to == 2) {
	        alpha <- zeta * sqrt(1 + hyperb.pi^2)/delta
	        beta <- zeta * hyperb.pi/delta
	        output = c(alpha = alpha, beta = beta, delta = delta, mu = mu) }
	    if (from == 1 && to == 3) {
	        phi <- zeta/delta * (sqrt(1 + hyperb.pi^2) + hyperb.pi)
	        gamma <- zeta/delta * (sqrt(1 + hyperb.pi^2) - hyperb.pi)
	        output = c(phi = phi, gamma = gamma, delta = delta, mu = mu)}
	    output }
	
	# Result - Use Standard Parameterization:
	Zeta = delta * sqrt(alpha^2 - beta^2)
	Pi = beta / sqrt(alpha^2 - beta^2)
	theta = c(Pi, Zeta, delta, mu)
	ans = rhyperb(n = n, theta = theta)

	# Return Value:
 	ans
}


# ******************************************************************************


dnig = 
function (x, alpha = 1, beta = 0, delta = 1, mu = 0)
{	# A function implemented by Diethelm Wuertz
	
  	# Description:
	#	Return Normal Inverse Gaussian Density Function PDF:  
	#	|beta| <= alpha  - Shape Parameters
	#	 0 <= delta      - Scale Parameter
	#	mu               - Location Parameter
	
	# Notes:
	#	Function Calls:
	#	Splus: 
	#		Needs: xK1, x * Modified Bessel Function K1  
	#	Fortran:
	#		DLL/OBJ: rarm.dll rarm.obj
	#		SUBROUTINE DNIG(density, x, n, alpha, beta, delta, mu)
	#			density - density
	#			x       - x-vector
	#			n       - number of points
	#			alpha, beta, delta, mu
	#				- parameters of the density function

   	# FUNCTION:
   	
   	# Compute:
	result = .Fortran("dnig",
	  	as.double(1:length(x)),
		as.double(x),
		as.integer(length(x)),
		as.double(alpha),
		as.double(beta),
	    as.double(delta),
		as.double(mu),
		PACKAGE = "fBasics")[[1]]
		
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


pnig = 
function (q, alpha = 1, beta = 0, delta = 1, mu = 0)
{	# A function implemented by Diethelm Wuertz

  	# Description:
	#	Return cumulative probability of inverse Gaussian PDF:

	# Arguments:
	#	|beta| <= alpha  - Shape Parameters
	#	0 <= delta       - Scale Parameter

	# Notes:
	#	Function Calls:
	#	SUBROUTINE PNIG(c, x, n, alpha, beta, delta, mu)
	#		c - cumulative probability
	#		q - q-vector
	#		n - number of points
	#		alpha, beta, delta, mu
	#		  - parameters of the density function

	# FUNCTION:
	result = .Fortran("pnig",
	  	as.double(1:length(q)),
		as.double(q),
		as.integer(length(q)),
		as.double(alpha),
		as.double(beta),
	    as.double(delta),
		as.double(mu),
		PACKAGE = "fBasics")
  	
	# Return Value:
    result[[1]]
}


# ------------------------------------------------------------------------------


qnig = 
function(p, alpha = 1, beta = 0, delta = 1, mu = 0)
{	# A function implemented by Diethelm Wuertz

	# Description:

	# Note:
	#	This procedure will not run under Splus.
 
	# FUNCTIONS:
	
	# Settings:
	maxiter = 10000
	tol = .Machine$double.eps^0.25
	
	# Internal Functions:
	.uniroot = function (f, lower, upper, tol, maxiter, ...) {
		if (f(lower, ...) * f(upper, ...) >= 0) root = NA
		else root = .Internal(zeroin(function(arg) f(arg, ...), 
			lower, upper, tol, as.integer(maxiter)))[1]
		root}		
	froot = function(x, alpha, beta, delta, p) {
		pnig(q = x, alpha = alpha, beta = beta, delta = delta, mu = 0) - p }
	
	# Loop over all p's				
	result = NULL	
	for (pp in p) {
		lower = -1
		upper = +1			
		counter = 0
		iteration = NA
		while (is.na(iteration)) {
			iteration = .uniroot(f = froot, lower = lower, upper = upper, 
				tol = tol, maxiter = maxiter, alpha = alpha, beta = beta, 
				delta = delta, p = pp)
			counter = counter + 1
			lower = lower-2^counter
			upper = upper+2^counter}		
	result = c(result, iteration) }	
	
	# Return Value:
	result + mu
}	


# ******************************************************************************


rnig = 
function(n, alpha = 1, beta = 0, delta = 1, mu = 0)
{ 	# A function implemented by Diethelm Wuertz

  	# Description:
  	#	Return normal inverse Gaussian distributed
	#	random variates

	# FUNCTION:	
	
	# Settings:
	gamma = sqrt(alpha*alpha - beta*beta)
	
	# GAMMA = 0:
	if (gamma == 0) {
		V = rnorm(n)^2
		Z = delta*delta / V
   		X = sqrt(Z)*rnorm(n) }
	
   	# GAMMA > 0:
	else { 
		U = runif(n)
		V = rnorm(n)^2
		z1 = function(v, delta, gamma) {
			delta/gamma + v/(gamma^2) - sqrt( 2*v*delta/(gamma^3) + 
			(v/(gamma^2))^2 ) }
		z2 = function(v, delta, gamma) {
			(delta/gamma)^2 / z1(v = v, delta = delta, gamma = gamma)}
		pz1 = function(v, delta, gamma) {
			delta / (delta + gamma * z1(v = v, delta = delta, gamma = gamma) ) }
		s = (1-sign(U-pz1(v = V, delta = delta, gamma = gamma)))/2
		Z = z1(v = V, delta = delta, gamma = gamma)*s + z2(v = V, delta = delta, 
			gamma=gamma)*(1-s)
		X = mu + beta*Z + sqrt(Z)*rnorm(n) }
	
	# Return Value:
	X
}


# ------------------------------------------------------------------------------


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#	  iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#	  General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#	sources obtained from a few dozens of websites


########################|#######################################################
# FUNCTION:		   		DESCRIPTION:
#  dsymstb	   			 Returns density for symmetric stable DF
#   psymstb	   			  Returns probabilities for symmetric stable DF
#   qsymstb	   			  Returns quantiles for symmetric stable DF
#   rsymstb	   			  Returns random variates for symmetric stable DF
#  dstable	   			 Returns density for stable DF
#   pstable	   			  Returns probabilities for stable DF
#   qstable	   			  Returns quantiles for stable DF
#   rstable	   			  Returns random variates for stable DF

################################################################################


dsymstb = 
function (x, alpha)
{	# # A function implemented by Diethelm Wuertz
  
	# Description:
  	#	Return symmetric alpha-stable pdf
  	
  	# Notes: 
  	#	symstb:
  	#   Return symmetric alpha-stable pdf/cdf. The function implements 
  	#	J.H. McCulloch's Fortran program for symmetric distributions.
	#	Mc Cullochs approach has a density precision of 0.000066
	#	and a distribution precision of 0.000022 for alpha in the 
	#	range [0.84, 2.00]. We have added only first order tail 
	#	approximation to calculate the tail density and probability.
	#	This has still to be improved!

	# FUNCTION:
	
	# Return Value:
	.Fortran("symstb",
	  	as.double(x),
	  	as.double(1:length(x)),
	  	as.double(1:length(x)),
	  	as.integer(length(x)),
	  	as.double(alpha),
	  	PACKAGE = "fBasics")[[3]]
}


# ------------------------------------------------------------------------------


psymstb = 
function (q, alpha)
{	# A function implemented by Diethelm Wuertz

  	# Description:
  	#	Return symmetric alpha-stable cdf

  	# Notes: 
  	#	symstb:
  	#   Return symmetric alpha-stable pdf/cdf. The function
	#	implements J.H. McCulloch's Fortran program for symmetric
	#	distributions.
	#	Mc Cullochs approach has a density precision of 0.000066
	#	and a distribution precision of 0.000022 for alpha in the 
	#	range [0.84, 2.00]. We have added only first order tail 
	#	approximation to calculate the tail density and probability.
	#	This has still to be improved!
	
	# FUNCTION:
	
	# Return Value:
	.Fortran("symstb",
	  	as.double(q),
	  	as.double(1:length(q)),
	  	as.double(1:length(q)),
	  	as.integer(length(q)),
	  	as.double(alpha),
	  	PACKAGE = "fBasics")[[2]]
}


# ------------------------------------------------------------------------------


qsymstb = 
function(p, alpha)
{	# A function implemented by Diethelm Wuertz

	# FUNCTION:
	
	# Settings:
	maxiter = 1000
	
	# Parameter Check:
	if (alpha > +2)  stop("Error: alpha greater than 2")
	if (alpha <= 0)	 stop("Error: alpha less or equal 0")
	# Special Cases:
	if (alpha == 2) result = qnorm(p = p, mean = 0, sd = sqrt(2))
	if (alpha == 1) result = qcauchy(p = p) 
	
	# Continue:
	if (alpha != 1 && alpha != 2) {
	maxiter <<- maxiter
	myUniroot <-
		function (f, interval, lower = min(interval), upper = max(interval), 
		maxiter, ...) {
			if (f(lower, ...) * f(upper, ...) >= 0) {
				result = NA}
			else {
				result = .Internal(zeroin(function(arg) f(arg, ...), 
				lower, upper, tol = .Machine$double.eps, as.integer(maxiter)))[1]}
			result}
		
	froot = 
		function(x, alpha, p) {psymstb(q = x, alpha = alpha) - p }
	
	# Calculate:	
	result = rep(NA, times=length(p))
	for (i in 1:length(p)) {
		pp = p[i]
		# xmin = -(1-pp)/pp
		if (pp < 0.5) xmin = qcauchy(pp)
		else xmin = qnorm(pp, mean=0, sd=sqrt(2))
		# xmax = pp/(1-pp) 
		if (pp < 0.5) xmax = qnorm(pp, mean=0, sd=sqrt(2))
		else xmax = qcauchy(pp)			
		iteration = NA
		counter = 0
		while (is.na(iteration)) {
			iteration = myUniroot(f = froot, c(xmin, xmax), alpha = alpha, 
				maxiter = maxiter, p = pp)
			counter = counter + 1
			xmin = xmin - 2^counter
			xmax = xmax + 2^counter}
		result[i] = iteration } }
	
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


rsymstb = 
function(n, alpha) 
{ 	# A function implemented by Diethelm Wuertz
	
  	# Description:
  	#	Return random deviates from the stable family 
	#	of probability distributions. The results of 
	#	Chambers, Mallows, and Stuck is used.

	# FUNCTION:
	
	# Calculate uniform and exponential distributed random numbers:
    theta = pi * (runif(n)-1/2)
    w = -log(runif(n))
	# Calculate Random Deviates:
    if (alpha == 1){
		result = rcauchy(n) }        
    else { 
		result = (sin(alpha*theta) / ((cos(theta))^(1/alpha))) *
			(cos((1-alpha)*theta)/w)^((1-alpha)/alpha)}	
	
	# Return Value:
    result
}


# ******************************************************************************


dstable = 
function(x, alpha, beta, gamma = 1, delta = 0, pm = 0)
{	# A function implemented by Diethelm Wuertz
	
	# Description:
  	#	Return alpha-stable density function (pdf) in form
  	#	of parmeterization 1. 
	#	The function uses the approach of J.P. Nolan for general 
	#	stable distributions. Nolan derived expressions in form 
	#	of integrals based on the charcteristic function for
	#	standardized stable random variables. These integrals
	#	can be numerically evaluated. 
	 
	# Arguments:
	#	alpha = index of stability, in the range (0,2]
  	#	beta  = skewness, in the range [-1, 1]
   	#	gamma = scale, in the range (0, infinity)
  	#	delta = location, in the range (-infinity, +infinity)
	#	param = type pf parmeterization:
	#		0. "S0" parameterization: based on the (M) representation
   	#		of Zolotarev for an alpha stable distribution with skewness
   	#		beta. Unlike the Zolotarev (M) parameterization, gamma and 
 	#		delta are straightforward scale and shift parameters. This
   	#		representation is continuous in all 4 parameters, and gives 
   	#		an intuitive meaning to gamma and delta that is lacking in 
  	#		other parameterizations.
 	#		1. "S" or "S1" parameterization: the parameterization used 
	#		by Samorodnitsky and Taqqu in the book Stable Non-Gaussian 
	#		Random Processes. It is a slight modification of Zolotarev's 
	#		(A) parameterization.
 	#		2. "S*" or "S2" parameterization: a modification of the S0 
	#		parameterization which is defined so that 
   	#		- the scale gamma agrees with the Gaussian scale (standard 
	#		  dev.) when alpha=2 and the Cauchy scale when alpha=1.
  	#		- the mode is exactly at delta.
 	#		3. "S3" parameterization: an internal parameterization.
   	#		The scale is the same as the S2 parameterization, the shift 
	#		is -beta*g(alpha), where g(alpha) is defined in the paper 
	#		below.
	#		Note, that up to now, only parameterization 0 is supported!
  	
  	# Notes: 
	#	The function doesn't apply for x[i] == 1, 
	#	this has to be fixed!

	# FUNCTION:
	
	# Settings:
	subdivisions = 1000
	
	# Internal Function:
	.integrate = function (f, lower, upper, subdivisions, rel.tol, 
	abs.tol, ...) {	# For Splus compatibility
		f = match.fun(f); ff = function(x) f(x, ...)
		wk = .External("call_dqags", ff, 
			rho = environment(), as.double(lower), 
			as.double(upper), as.double(abs.tol), 
			as.double(rel.tol), limit = as.integer(subdivisions), 
			PACKAGE = "base")
		wk[c("value", "abs.error", "subdivisions")] }
		
  	# Parameter Check:
	        if (pm != 0)     stop("Error: Only Parametrization 0 supported")
		if (alpha > +2)  stop("Error: alpha greater than 2")
		if (alpha <= 0)	 stop("Error: alpha less or equal 0")
		if (beta  < -1)  stop("Error: beta less than -1")
		if (beta  > +1)  stop("Error: beta greater than 1")
	# Special Cases:
		if (alpha == 2)  result = dnorm(x, mean=0, sd=sqrt(2))
		if (alpha == 1 & beta == 0) result = dcauchy(x) 
	# gamma, delta:
		x = (x-delta)/gamma
	# General Case 0 < alpha < 2  and  -1 <= beta <= 1 :
    		if (abs(alpha-1) < 1 & alpha !=1 & abs(beta) <= 1) {
			subdivisions <<- subdivisions
			# Function to Integrate:
			"g" <<- 
			function(x, xarg, alpha, beta) {
				varzeta = -beta * tan(pi*alpha/2)
    				theta0 = (1/alpha) * atan( beta * tan(pi*alpha/2))
      				v = (cos(alpha*theta0))^(1/(alpha-1)) *
        				(cos(x)/sin(alpha*(theta0+x)))^(alpha/(alpha-1)) *
        				(cos(alpha*theta0+(alpha-1)*x)/cos(x))
      				g = (xarg-varzeta)^(alpha/(alpha-1)) * v
      				gval = g * exp(-g) 
				gval}
			# Integration:	
			"fct" <<-
			function(xarg, alpha, beta) { 
				varzeta = -beta * tan(pi*alpha/2)
    				theta0 = (1/alpha) * atan( beta * tan(pi*alpha/2))
				theta2 = optimize(f=g, lower=-theta0, upper=pi/2, maximum=TRUE,
					tol=.Machine$double.eps, xarg=xarg, alpha=alpha, 
					beta=beta)$maximum
				c2 = ( alpha / (pi*abs(alpha-1)*(xarg-varzeta)) ) 
        			result1 = .integrate(f=g, lower=-theta0, upper=theta2, 
          				subdivisions=subdivisions, 
					rel.tol=.Machine$double.eps, abs.tol=.Machine$double.eps,
          				xarg=xarg, alpha=alpha, beta=beta)$value
				result2 = .integrate(f=g, lower=theta2, upper=pi/2, 
          				subdivisions=subdivisions,
					rel.tol=.Machine$double.eps, abs.tol=.Machine$double.eps,
          				xarg=xarg, alpha=alpha, beta=beta)$value
				c2*(result1+result2) }
			# Loop over all x values:
    			result = rep(NA, times=length(x))  
    			for ( i in 1:length(result) ) { 
				varzeta = -beta * tan(pi*alpha/2)
      				if (x[i] == varzeta){
					theta0 = (1/alpha) * atan( beta * tan(pi*alpha/2))
					result[i] = gamma(1+1/alpha)*cos(theta0) /
	     					(pi*(1+varzeta^2)^(1/(2*alpha)))} 
      				if (x[i] > varzeta) result[i] = 
      					fct(xarg=x[i], alpha=alpha, beta=beta)
      				if (x[i] < varzeta) result[i] = 
      					fct(xarg=-x[i], alpha=alpha, beta=-beta)}}
		# General Case 0 < alpha < 2  and  -1 <= beta <= 1 :
		if (alpha == 1 & abs(beta) <= 1 & beta != 0) {
			subdivisions <<- subdivisions
			# Function to Integrate:
			"g" <<- 
			function(x, xarg, alpha, beta) {
				# x is a non-sorted vector!
      				v = (2/pi) * ((pi/2+beta*x) / cos(x)) *
					exp((1/beta)*(pi/2+beta*x)*tan(x))
      				g = exp( -pi*xarg/(2*beta) ) * v
				gval = g * exp(-g) 
				# replace NA at pi/2
				for (i in 1:length(gval)) if(is.na(gval[i])) gval[i] = 0
				gval }
			# Integration:	
			"fct" <<-
			function(xarg, alpha, beta) { 
				theta2 = optimize(f=g, lower=-pi/2, upper=pi/2, maximum=TRUE,
					tol=.Machine$double.eps, xarg=xarg, alpha=alpha, 
					beta=beta)$maximum
				c2 = 1 / (2*abs(beta)) 
        			result1 = .integrate(f=g, lower=-pi/2, upper=theta2, 
          				subdivisions=subdivisions, 
					rel.tol=.Machine$double.eps, abs.tol=.Machine$double.eps, 
          				xarg=xarg, alpha=alpha, beta=beta)$value
				result2 = .integrate(f=g, lower=theta2, upper=pi/2, 
          				subdivisions=subdivisions, 
					rel.tol=.Machine$double.eps, abs.tol=.Machine$double.eps,
          				xarg=xarg, alpha=alpha, beta=beta)$value
				c2*(result1+result2) }
			# Loop over all x values:
    			result = rep(NA, times=length(x))  
    			for ( i in 1:length(result) ) {
      				if (x[i] >= 0) result[i] = 
      					fct(xarg=x[i], alpha=alpha, beta=beta)
      				if (x[i] < 0) result[i] = 
      					fct(xarg=-x[i], alpha=alpha, beta=-beta) }}
  	
    # Return Value:
    result/gamma
}


# ------------------------------------------------------------------------------


pstable = 
function(q, alpha, beta, gamma = 1, delta = 0, pm = 0)
{	# A function implemented by Diethelm Wuertz

  	# FUNCTION:
  	
  	# Settings:
    subdivisions = 1000 	
  	x = q
  	
  	# Internal Function:
	.integrate = function (f, lower, upper, subdivisions, rel.tol, 
	abs.tol, ...) {	# For Splus compatibility
		f = match.fun(f); ff = function(x) f(x, ...)
		wk = .External("call_dqags", ff, 
			rho = environment(), as.double(lower), 
			as.double(upper), as.double(abs.tol), 
			as.double(rel.tol), limit = as.integer(subdivisions), 
			PACKAGE = "base")
		wk[c("value", "abs.error", "subdivisions")] }
		
	# Parameter Check:
	    if (pm != 0)     stop("Error: Only Parametrization 0 supported")
		if (alpha > +2)  stop("Error: alpha greater than 2")
		if (alpha <= 0)	 stop("Error: alpha less or equal 0")
		if (beta  < -1)  stop("Error: beta less than -1")
		if (beta  > +1)  stop("Error: beta greater than 1")
	# Special Cases:
		if (alpha == 2)  result = pnorm(x, mean=0, sd=sqrt(2))
		if (alpha == 1 & beta == 0) result = pcauchy(x) 
	# gamma, delta:
		x = (x-delta)/gamma
	# General Case 0 < alpha < 2  and  -1 <= beta <= 1 :
    		if (abs(alpha-1) < 1 & alpha !=1 & abs(beta) <= 1) {
			tol <<- .Machine$double.eps
			subdivisions <<- subdivisions	
			# Function to Integrate:
			"G" <<- 
			function(x, xarg, alpha, beta) {
				varzeta = -beta * tan(pi*alpha/2)
    				theta0 = (1/alpha) * atan( beta * tan(pi*alpha/2))
      				v = (cos(alpha*theta0))^(1/(alpha-1)) *
        				(cos(x)/sin(alpha*(theta0+x)))^(alpha/(alpha-1)) *
        				cos(alpha*theta0+(alpha-1)*x)/cos(x)
      				g = (xarg-varzeta)^(alpha/(alpha-1)) * v
      				gval = exp(-g)
				gval}
			# Integration:	
			"FCT" <<-
			function(xarg, alpha, beta) { 
				varzeta = -beta * tan(pi*alpha/2)
    				theta0 = (1/alpha) * atan( beta * tan(pi*alpha/2))
				theta2 = optimize(f=G, lower=-theta0, upper=pi/2, maximum=TRUE,
					tol=.Machine$double.eps, xarg=xarg, alpha=alpha, 
					beta=beta)$maximum
				if (alpha < 1) c1 = (1/pi)*(pi/2-theta0)
				if (alpha > 1) c1 = 1
				c3 = sign(1-alpha)/pi
        			result1 = .integrate(f=G, lower=-theta0, upper=theta2, 
          				subdivisions=subdivisions, 
					rel.tol=.Machine$double.eps, abs.tol=.Machine$double.eps,
          				xarg=xarg, alpha=alpha, beta=beta)$value
				result2 = .integrate(f=G, lower=theta2, upper=pi/2, 
          				subdivisions=subdivisions, rel.tol=tol, abs.tol=tol,
          				xarg=xarg, alpha=alpha, beta=beta)$value
				c1 + c3*(result1+result2) }
			# Loop over all x values:
    			result = rep(0, times=length(x))  
    			for ( i in 1:length(result) ) { 
				varzeta = -beta * tan(pi*alpha/2)
      				if (x[i] == varzeta){ 
					theta0 = (1/alpha) * atan( beta * tan(pi*alpha/2))
					result[i] = (1/pi)*(pi/2-theta0)} 
      				if (x[i] > varzeta) result[i] = 
      					FCT(xarg=x[i], alpha=alpha, beta=beta)
      				if (x[i] < varzeta) result[i] = 
      					1-FCT(xarg=-x[i], alpha=alpha, beta=-beta)}}
		# General Case 0 < alpha < 2  and  -1 <= beta <= 1 :
		if (alpha == 1 & abs(beta) <= 1 & beta != 0) {
			tol <<- .Machine$double.eps
			subdivisions <<- subdivisions	
			# Function to Integrate:
			"G" <<- 
			function(x, xarg, alpha, beta) {
				# x is a non-sorted vector!
      				v = (2/pi) * ((pi/2+beta*x) / cos(x)) *
					exp((1/beta)*(pi/2+beta*x)*tan(x))
      				g = exp( -pi*xarg/(2*beta) ) * v
				gval = exp(-g) 
				# replace NA at pi/2
				for (i in 1:length(gval)) if(is.na(gval[i])) gval[i] = 0
				gval 
			}
			# Integration:	
			"FUNC" <<-
			function(xarg, alpha, beta) { 
				theta2 = optimize(f=G, lower=-pi/2, upper=pi/2, maximum=TRUE,
					tol=.Machine$double.eps, xarg=xarg, alpha=alpha, 
					beta=beta)$maximum
				c3 = 1/pi
        			result1 = .integrate(f=G, lower=-pi/2, upper=theta2, 
          				subdivisions=subdivisions, 
					rel.tol=.Machine$double.eps, abs.tol=.Machine$double.eps,
          				xarg=xarg, alpha=alpha, beta=beta)$value
				result2 = .integrate(f=G, lower=theta2, upper=pi/2, 
          				subdivisions=subdivisions, 
					rel.tol=.Machine$double.eps, abs.tol=.Machine$double.eps,
          				xarg=xarg, alpha=alpha, beta=beta)$value
				c3*(result1+result2) 
			}
			# Loop over all x values:
    			result = rep(0, times=length(x))  
    			for ( i in 1:length(result) ) { 
      				if (beta >= 0) result[i] = 
      					FUNC(xarg=x[i], alpha=alpha, beta=beta)
      				if (beta < 0) result[i] = 
      					1-FUNC(xarg=-x[i], alpha=alpha, beta=-beta)
     			}
		}
  	
	# Return Value:
    result
}


# ------------------------------------------------------------------------------


qstable = 
function(p, alpha, beta, gamma = 1, delta = 0, pm = 0)
{	# A function implemented by Diethelm Wuertz

	# FUNCTION:
	
	# Settings:
	maxiter = 1000 
    subdivisions = 1000

	# Parameter Check:
	if (pm != 0)     stop("Error: Only Parametrization 0 supported")
	if (alpha > +2)  stop("Error: alpha greater than 2")
	if (alpha <= 0)	 stop("Error: alpha less or equal 0")
	if (beta  < -1)  stop("Error: beta less than -1")
	if (beta  > +1)  stop("Error: beta greater than 1")
	# Special Cases:
	if (alpha == 2)  result = qnorm(p, mean=0, sd=sqrt(2))
	if (alpha == 1 & beta == 0) result = qcauchy(p) 
	# Range 0 < alpha < 2:
	if (abs(alpha-1) < 1) {
		myUniroot = 
		function (f, interval, lower=min(interval), upper = max(interval), 
			maxiter, ...) 
			{
			if (f(lower, ...) * f(upper, ...) >= 0) result = NA
			else result = .Internal(zeroin(function(arg) f(arg, ...), 
				lower, upper, tol=.Machine$double.eps, as.integer(maxiter)))[1]
			result}
		froot = 
		function(x, alpha, beta, subdivisions, p) {
			pstable(q=x, alpha=alpha, beta=beta)-p }
		# Calculate:
		subdivisions <<-subdivisions
		result = rep(NA, times=length(p))
		for (i in 1:length(p)) {
			pp = p[i]
			if (beta < 0) {
				xmin = -(1-pp)/pp
				#xmax = pp/(1-pp)
				if (pp < 0.5) xmax = qnorm(pp, mean=0, sd=sqrt(2))
				else xmax = qcauchy(pp)}
			if (beta > 0 ) {
				#xmin = -(1-pp)/pp
				if (pp < 0.5) xmin = qcauchy(pp)
				else xmin = qnorm(pp, mean=0, sd=sqrt(2))
				xmax = pp/(1-pp)}
			if (beta == 0 ) {
				#xmin = -(1-pp)/pp
				if (pp < 0.5) xmin = qcauchy(pp)
				else xmin = qnorm(pp, mean=0, sd=sqrt(2))
				#xmax = pp/(1-pp) 
				if (pp < 0.5) xmax = qnorm(pp, mean=0, sd=sqrt(2))
				else xmax = qcauchy(pp)}
			iteration = NA
			counter = 0
			while (is.na(iteration)) {
				iteration = myUniroot(f=froot, c(xmin, xmax), 
					alpha=alpha, beta=beta,
					maxiter=maxiter, subdivisions=subdivisions, p=pp)
				counter = counter + 1
				xmin = xmin-2^counter
				xmax = xmax+2^counter}
			result[i] = iteration
		}
	}
	
	# Return Value:
	result*gamma+delta
}


# ------------------------------------------------------------------------------


rstable = 
function(n, alpha, beta, gamma = 1, delta = 0, pm = 0)
{ 	# A function implemented by Diethelm Wuertz

  	# Description:
  	#	Return random deviates from the stable family 
	#	of probability distributions.

	# FUNCTION:
	
  	# Calculate uniform and exponential distributed random numbers:
    theta = pi * (runif(n)-1/2)
    w = -log(runif(n))
  	# If alpha is equal 1 then:
    if (alpha == 1){
	   	result = rcauchy(n) }        
  		# Otherwise, if alpha is different from 1:
    else { 
      	c = (1+(beta*tan(pi*alpha/2))^2)^(1/(2*alpha))
      	theta0 = (1/alpha)*atan(beta*tan(pi*alpha/2))
      	result = ( c*sin(alpha*(theta+theta0))/
        	(cos(theta))^(1/alpha) ) *
        	(cos(theta-alpha*(theta+theta0))/w)^((1-alpha)/alpha) 
		# Use Parametrization 0:
		result = result - beta * tan(alpha*pi/2)}
  	
	# Return Value:
    result * gamma + delta
}
	

# ------------------------------------------------------------------------------


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#	  iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#	  General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#	sources obtained from a few dozens of websites


################################################################################
# FUNCTION:		   		DESCRIPTION:	
#  tFit					 Fits Parameters of a Student-t Density
#  hypFit				 Fits Parameters of a hyperbolic Density
#  nigFit				 Fits Parameters of a normal inverse Gaussian Density
#  hypStats              Computes statistics of a hyperbolic Density
################################################################################


tFit = 
function(x, df, doplot = TRUE, span = seq(from = -10, to = 10, by = 0.1), ...)
{	# A function implemented by Diethelm Wuertz
   	
	# Description:
	#	Return Maximum log-likelihood estimated
   	#	Paramters for Student-t Distribution:
   	  
	# Function Calls: 
	#	nlminb(), density() 
   	
	# FUNCTION:
	
	# Internal Function:
	.nlopt = function(start.p, objective.f, ...) {
		opt = nlm(f = objective.f, p = start.p, ...)
		list(estimate=opt$estimate, objective=opt$minimum, 			
		gradient = opt$gradient, message = opt$code) }
	
	# Settings:
	steps <<- 0
	
	# Log-likelihood Function:
	etmle = function(x, y = x) { 
		# Prevent from negative df's
		if (x[1] <= 0) x[1] = x.save
	   	f = -sum(log(dt(y, x[1])))
		# Print Iteration Path:
		steps <<- steps + 1
		cat("\n Optimization Step:         ", steps)
	   	cat("\n Objective Function Value:  ", -f)
		cat("\n Students df Estimate:      ", x[1], "\n") 
	   	x.save <<- x[1]
		f }
		
  	# Minimization:
	r = .nlopt(objective.f = etmle, start.p = c(df), print.level = 0, y = x)
	
	# Optional Plot:
	if (doplot) {
		par(err=-1)
		z = density(x, n = 100, ...)
		x = z$x[z$y > 0]
		y = z$y[z$y > 0]
		plot(x, log(y), xlim = c(span[1], span[length(span)]), 
			type = "p", xlab = "x", ylab = "log f(x)", ...)
		title("STUDENT-T: Parameter Estimation")
		y = dt(span, df = r$estimate)
		lines(x = span, y = log(y), col = "steelblue3") 
		grid() }
		
	# Return Values:
	list(estimate = r$estimate, objective = -r$objective, message = r$message,		
		gradient = r$gradient, steps = steps) 
}


# ------------------------------------------------------------------------------


hypFit = 
function(x, alpha = 1, beta = 0, delta = 1, mu = 0, 
doplot = TRUE, span = seq(from = -10, to = 10, by = 0.1), ...)
{	# A function implemented by Diethelm Wuertz
   	
	# Description:
	#	Return Maximum log-likelihood estimated
   	#	Paramters for Hyperbolic Distribution:
   	   
	# Note:
	#	Function Calls: 
	#	density() 

	# FUNCTION:
	
	# Internal Function:
	.nlopt = function(start.p, objective.f, ...) {
		opt = nlm(f = objective.f, p = start.p, ...)
		list(estimate = opt$estimate, objective = opt$minimum, 			
		gradient = opt$gradient, message = opt$code)}
	
	# Settings:
	steps <<- 0
	
	# Log-likelihood Function:
	ehypmle = function(x, y = x){ 
	   	f = -sum(log(dhyp(y, x[1], x[2], x[3], x[4])))
		# Print Iteration Path:
		steps <<- steps + 1
		cat("\n Optimization Step:         ", steps)
	   	cat("\n Objective Function Value:  ", -f)
		cat("\n Parameter Estimates:       ", x[1], x[2], x[3], x[4], "\n") 
	   	f }
	   	
   	# Minimization:
	r = .nlopt(objective.f = ehypmle, start.p = c(alpha, beta, delta, mu), 
		print.level = 0, y = x)
		
	# Optional Plot:
	if(doplot) {
		par(err=-1)
		z = density(s, n = 100, ...)
		x = z$x[z$y > 0]
		y = z$y[z$y > 0]
		plot(x, log(y), xlim = c(span[1],span[length(span)]), 
			type = "p", xlab = "x", ylab = "log f(x)", ...)
		title("HYP: Parameter Estimation")
		y = dhyp(span, 
			alpha = r$estimate[1], 
			beta = r$estimate[2], 
			delta = r$estimate[3], 
			mu = r$estimate[4])
		lines(x = span, y = log(y), col = "steelblue3")
		grid() }
		
	# Return Value:
	list(estimate = r$estimate, objective = -r$objective, 
		message = r$message, gradient = r$gradient, steps = steps) 
}


# ------------------------------------------------------------------------------


nigFit = 
function(x, alpha = 1, beta = 0, delta = 1, mu = 0, 
doplot = TRUE, span = seq(from = -10, to = 10, by = 0.1), ...)
{	# A function implemented by Diethelm Wuertz
   	
	# Description:
	#	Return Maximum log-likelihood estimated
   	#	Paramters for Inverse Gaussian Distribution:
   	  
	# Notes:
	#	Function Calls: 
	#	nlminb(), density() 
   	
	# FUNCTION:
	
	# Internal Function:
	.nlopt = function(start.p, objective.f, ...) {
		opt = nlm(f = objective.f, p = start.p, ...)
		list(estimate = opt$estimate, objective = opt$minimum, 			
		gradient = opt$gradient, message = opt$code) }
	
	# Settings:
	steps <<- 0
	
	# Log-likelihood Function:
	enigmle = function(x, y = x){ 
	   	f = -sum(log(dnig(y, x[1], x[2], x[3], x[4])))
		# Print Iteration Path:
		steps <<- steps + 1
		cat("\n Optimization Step:         ", steps)
	   	cat("\n Objective Function Value:  ", -f)
		cat("\n Parameter Estimates:       ", x[1], x[2], x[3], x[4], "\n") 
	   	f }
	   	
   	# Minimization:
	r = .nlopt(objective.f = enigmle, start.p = c(alpha, 
		beta, delta, mu), print.level = 0, y = x)
		
	# Optional Plot:
	if(doplot) {
		par(err=-1)
		z = density(x, n=100, ...)
		x = z$x[z$y>0]
		y = z$y[z$y>0]
		plot(x, log(y), xlim=c(span[1], span[length(span)]), type="p", 
			xlab="x", ylab="log f(x)", ...)
		title("NIG: Parameter Estimation")
		y = dnig(span, 
			alpha=r$estimate[1], 
			beta=r$estimate[2], 
			delta=r$estimate[3], 
			mu=r$estimate[4])
		lines(x=span, y=log(y), col="steelblue3") 
		grid() }
	
	# Return Value:
	list(estimate = r$estimate, objective = -r$objective,	
		message = r$message, gradient = r$gradient, steps = steps) 
}


# ------------------------------------------------------------------------------


hypStats = 
function (alpha = 1, beta = 0, delta = 1, mu = 0)
{	# A function implemented by Diethelm Wuertz

  	# Description:
	#	Returns basic statistics for a Hyperbolic PDF:
	#	i.e. mean and variance.
 
	# Arguments:
	#	|beta| <= alpha  - Shape Parameters
	#	0 <= delta       - Scale Parameter
	#	mu               - Location Parameter

	# Notes:
	#	Function Calls:
	#	SUBROUTINE SHYP(xmean, xvar, alpha, beta, delta)

   	# FUNCTION:
   	
   	# Compute
	result = .Fortran("shyp",
	  	as.double(0),
	  	as.double(0),
	  	as.double(alpha),
	 	as.double(beta),
	  	as.double(delta),
	  	PACKAGE = "fBasics")
  	
	# Return Value:
    list(mean = mu+result[[1]], var = result[[2]])
}


# ------------------------------------------------------------------------------

# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#     iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#     General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#   sources obtained from a few dozens of websites


################################################################################
# FUNCTION:             NORMAL TESTS:
#  shapiroTest           Shapiro-Wilk's test for normality
#  adTest                Anderson-Darling normality test
#  cvmTest               Cramer-von Mises normality test
#  lillieTest            Lilliefors (Kolmogorov-Smirnov) normality test 
#  pearsonTest           Pearson chi-square normality test 
#  sfTest                Shapiro-Francia normality test     
#  dagoTest              D'Agostino normality test
# FUNCTION:             DESCRIPTION:
#  bartlettTest          Bartlett's test for differences in variances
#  flignerTest           Fligner-Killeen's test for differences in variances
#  varTest               F test for differences in variances
#  ansariTest            Ansari-Bradley's test for differences in scale
#  moodTest              Mood's test for differences in scale
#  corTest               A test for association between paired samples
#  ksTest                One or two sample Kolmogorov-Smirnov tests      
# FUNCTION:             DESCRIPTION:
#  runsTest              Runs test for detecting non-randomness
#  gofnorm               Reports on several tests of normality
################################################################################


shapiroTest = 
function(x)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Performs the Shapiro-Wilk test for normality. 
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Note:
    #   A function linked to "stats"
    
    # FUNCTION:
    
    # Return Value:
    shapiro.test(x = x)
}


# ------------------------------------------------------------------------------


adTest =
function (x) 
{	# A function implemented by Diethelm Wuertz

    # Description:
    #   Anderson-Darling normality test
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Source:
    #   Package: nortest
    #   Title: Tests for Normality
    #   Version: 1.0
    #   Author: Juergen Gross
    #   Description: 5 omnibus tests for the composite hypothesis of normality
    #   Maintainer: Juergen Gross <gross@statistik.uni-dortmund.de>
    #   License: GPL version 2 or newer
    
    # FUNCTION:
    
    # Test:
    DNAME = deparse(substitute(x))
    x = sort(x[complete.cases(x)])
    n = length(x)
    if (n < 8) stop("sample size must be greater than 7")
    p = pnorm((x - mean(x))/sd(x))
    h = (2 * seq(1:n) - 1) * (log(p) + log(1 - rev(p)))
    A = -n - mean(h)
    AA = (1 + 0.75/n + 2.25/n^2) * A
    if (AA < 0.2) {
        pval = 1 - exp(-13.436 + 101.14 * AA - 223.73 * AA^2)}
    else if (AA < 0.34) {
        pval = 1 - exp(-8.318 + 42.796 * AA - 59.938 * AA^2) }
    else if (AA < 0.6) {
        pval = exp(0.9177 - 4.279 * AA - 1.38 * AA^2) }
    else {
        pval = exp(1.2937 - 5.709 * AA + 0.0186 * AA^2) }
    RVAL = list(
    	statistic = c(A = A), 
    	p.value = pval, 
        method = "Anderson-Darling normality test", 
        data.name = DNAME)
    class(RVAL) = "htest"
    
    # Return Value:
    return(RVAL)
}


# ------------------------------------------------------------------------------


cvmTest = 
function(x) 
{	# A function implemented by Diethelm Wuertz

    # Description:
    #   Cramer-von Mises normality test
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Source:
    #   Package: nortest
    #   Title: Tests for Normality
    #   Version: 1.0
    #   Author: Juergen Gross
    #   Description: 5 omnibus tests for the composite hypothesis of normality
    #   Maintainer: Juergen Gross <gross@statistik.uni-dortmund.de>
    #   License: GPL version 2 or newer
    
    # FUNCTION:
    
    # Test:
    DNAME = deparse(substitute(x))
    x = sort(x[complete.cases(x)])
    n = length(x)
    if (n < 8) stop("sample size must be greater than 7")
    p = pnorm((x - mean(x))/sd(x))
    W = (1/(12 * n) + sum((p - (2 * seq(1:n) - 1)/(2 * n))^2))
    WW = (1 + 0.5/n) * W
    if (WW < 0.0275) {
        pval = 1 - exp(-13.953 + 775.5 * WW - 12542.61 * WW^2) }
    else if (WW < 0.051) {
        pval = 1 - exp(-5.903 + 179.546 * WW - 1515.29 * WW^2) }
    else if (WW < 0.092) {
        pval = exp(0.886 - 31.62 * WW + 10.897 * WW^2) }
    else {
        pval = exp(1.111 - 34.242 * WW + 12.832 * WW^2)}
    RVAL = list(
    	statistic = c(W = W), 
    	p.value = pval, 
        method = "Cramer-von Mises normality test", 
        data.name = DNAME)
    class(RVAL) = "htest"
    
    # Return Value:
    return(RVAL)
}


# ------------------------------------------------------------------------------


lillieTest = 
function(x) 
{	# A function implemented by Diethelm Wuertz

    # Description:
    #   Lilliefors (Kolmogorov-Smirnov) normality test  
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Source:
    #   Package: nortest
    #   Title: Tests for Normality
    #   Version: 1.0
    #   Author: Juergen Gross
    #   Description: 5 omnibus tests for the composite hypothesis of normality
    #   Maintainer: Juergen Gross <gross@statistik.uni-dortmund.de>
    #   License: GPL version 2 or newer
    
    # FUNCTION:
    
    # Test:
    DNAME = deparse(substitute(x))
    x = sort(x[complete.cases(x)])
    n = length(x)
    if (n < 5) stop("sample size must be greater than 4")
    p = pnorm((x - mean(x))/sd(x))
    Dplus = max(seq(1:n)/n - p)
    Dminus = max(p - (seq(1:n) - 1)/n)
    K = max(Dplus, Dminus)
    if (n <= 100) {
        Kd = K
        nd = n }
    else {
        Kd = K * ((n/100)^0.49)
        nd = 100 }
    pvalue = exp(-7.01256 * Kd^2 * (nd + 2.78019) + 2.99587 * 
        Kd * sqrt(nd + 2.78019) - 0.122119 + 0.974598/sqrt(nd) + 
        1.67997/nd)
    if (pvalue > 0.1) {
        KK = (sqrt(n) - 0.01 + 0.85/sqrt(n)) * K
        if (KK <= 0.302) {
            pvalue = 1 }
        else if (KK <= 0.5) {
            pvalue = 2.76773 - 19.828315 * KK + 80.709644 * 
                KK^2 - 138.55152 * KK^3 + 81.218052 * KK^4 }
        else if (KK <= 0.9) {
            pvalue = -4.901232 + 40.662806 * KK - 97.490286 * 
                KK^2 + 94.029866 * KK^3 - 32.355711 * KK^4 }
        else if (KK <= 1.31) {
            pvalue = 6.198765 - 19.558097 * KK + 23.186922 * 
                KK^2 - 12.234627 * KK^3 + 2.423045 * KK^4 }
        else {
            pvalue = 0 } }
    RVAL = list(
    	statistic = c(D = K), 
    	p.value = pvalue, 
        method = "Lilliefors (Kolmogorov-Smirnov) normality test", 
        data.name = DNAME)
    class(RVAL) = "htest"
    
    # Return Value:
    return(RVAL)
}


# ------------------------------------------------------------------------------


pearsonTest = 
function (x, n.classes = ceiling(2 * (n^(2/5))), adjust = TRUE) 
{	# A function implemented by Diethelm Wuertz

    # Description:
    #   Pearson chi-square normality test   
    
    # Arguments:
    #   x - a numeric vector of data values.
    #   n.classes - the number of classes. The default is due 
    #       to Moore (1986). 
    #   adjust - a logical flag,  if TRUE (default), the p-value 
    #       is computed from a chi-square distribution with 
    #       n.classes-3 degrees of freedom, otherwise from a 
    #       chi-square distribution with n.classes-1 degrees of 
    #       freedom. 


    # Source:
    #   Package: nortest
    #   Title: Tests for Normality
    #   Version: 1.0
    #   Author: Juergen Gross
    #   Description: 5 omnibus tests for the composite hypothesis of normality
    #   Maintainer: Juergen Gross <gross@statistik.uni-dortmund.de>
    #   License: GPL version 2 or newer
    
    # FUNCTION:
    
    # Test:
    DNAME = deparse(substitute(x))
    x = x[complete.cases(x)]
    n = length(x)
    if (adjust == TRUE) {
        dfd = 2 }
    else {
        dfd = 0 }
    num = floor(1 + n.classes * pnorm(x, mean(x), sd(x)))
    count = tabulate(num, n.classes)
    prob = rep(1/n.classes, n.classes)
    xpec = n * prob
    h = ((count - xpec)^2)/xpec
    P = sum(h)
    pvalue = pchisq(P, n.classes - dfd - 1, lower.tail = FALSE)
    RVAL = list(
    	statistic = c(P = P), 
    	p.value = pvalue, 
        method = "Pearson chi-square normality test", 
        data.name = DNAME, 
        n.classes = n.classes, 
        df = n.classes - 1 - dfd)
    class(RVAL) = "htest"
    
    # Return Value:
    return(RVAL)
}


# ------------------------------------------------------------------------------


sfTest = 
function(x) 
{	# A function implemented by Diethelm Wuertz

    # Description:
    #   Shapiro-Francia normality test  
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Source:
    #   Package: nortest
    #   Title: Tests for Normality
    #   Version: 1.0
    #   Author: Juergen Gross
    #   Description: 5 omnibus tests for the composite hypothesis of normality
    #   Maintainer: Juergen Gross <gross@statistik.uni-dortmund.de>
    #   License: GPL version 2 or newer
    
    # FUNCTION:
    
    # Test:
    DNAME = deparse(substitute(x))
    x = sort(x[complete.cases(x)])
    n = length(x)
    if ((n < 5 || n > 5000)) 
        stop("sample size must be between 5 and 5000")
    y = qnorm(ppoints(n, a = 3/8))
    W = cor(x, y)^2
    u = log(n)
    v = log(u)
    mu = -1.2725 + 1.0521 * (v - u)
    sig = 1.0308 - 0.26758 * (v + 2/u)
    z = (log(1 - W) - mu)/sig
    pval = pnorm(z, lower.tail = FALSE)
    RVAL = list(
    	statistic = c(W = W), 
    	p.value = pval, 
        method = "Shapiro-Francia normality test", 
        data.name = DNAME)
    class(RVAL) = "htest"
    
    # Return Value:
    return(RVAL)
}


# ------------------------------------------------------------------------------


dagoTest =
function(x, method = c("omnibus", "skewness", "kurtosis"))  
{	# A function implemented by Diethelm Wuertz

    # Description:
    #   D'Agostino Test
    
    # Arguments:
    #   x - a numeric vector of data values.
    #   method - the kind of test to be performed, either the
    #       "omnibus" (by default), the "skewness" or the "kurtosis"
    #       test. A character string.
    
    # Source:
    #   This function was inspired by ...
    #   http://adela.karlin.mff.cuni.cz/~klaster/vyuka/
    
    # FUNCTION:
    
    # Settings:
    method = method[1]
    
    # Internal Function:
    skewness.test = function(x) {
       DNAME = deparse(substitute(x))
       x = x[complete.cases(x)]
       n = length(x)
       if (n < 8) stop("Sample size must be at least 8")
       meanX = mean(x)
       s =  sqrt(mean((x-meanX)**2))
       a3 = mean((x-meanX)**3)/s**3
       SD3 = sqrt(6*(n-2)/((n+1)*(n+3)))
       U3 = a3/SD3
       b  = (3*(n**2+27*n-70)*(n+1)*(n+3))/((n-2)*(n+5)*(n+7)*(n+9))
       W2 = sqrt(2*(b-1))-1
       delta = 1/sqrt(log(sqrt(W2)))
       a = sqrt(2/(W2-1))
       Z3 = delta*log((U3/a)+sqrt((U3/a)**2+1))
       pZ3 = 2*(1-pnorm(abs(Z3),0,1))
       names(Z3) = "Z3"
       RVAL = list(
          statistic = Z3,
          p.value = pZ3,
          method = "D'Agostino skewness normality test",
          data.name = DNAME)
       class(RVAL) = "htest"
       return(RVAL)}
        
    # Internal Function:
    kurtosis.test = function(x) {
       DNAME = deparse(substitute(x))
       x = x[complete.cases(x)]
       n = length(x)
       if (n < 20) stop("Sample size must be at least 20")
       meanX = mean(x)
       s =  sqrt(mean((x-meanX)**2))
       a4 = mean((x-meanX)**4)/s**4
       SD4 = sqrt(24*(n-2)*(n-3)*n/((n+1)**2*(n+3)*(n+5)))
       U4 = (a4-3+6/(n+1))/SD4
       B = (6*(n*n-5*n+2)/((n+7)*(n+9)))*sqrt((6*(n+3)*(n+5))/(n*(n-2)*(n-3)))  
       A = 6+(8/B)*((2/B)+sqrt(1+4/(B**2)))
       jm = sqrt(2/(9*A))
       pos = ((1-2/A)/(1+U4*sqrt(2/(A-4))))**(1/3)
       Z4 = (1-2/(9*A)-pos)/jm
       pZ4 = 2*(1-pnorm(abs(Z4),0,1))
       names(Z4) = "Z4"
       RVAL = list(
         statistic = Z4,
         p.value = pZ4,
         method = "D'Agostino kurtosis normality test",   
         data.name = DNAME)
       class(RVAL) = "htest"
       return(RVAL)}
        
    # Internal Function:
    omnibus.test = function(x) {
       DNAME = deparse(substitute(x))
       x = x[complete.cases(x)]
       n = length(x)
       if (n < 20) stop("sample size must be at least 20")
       meanX = mean(x)
       s =  sqrt(mean((x-meanX)**2))
       a3 = mean((x-meanX)**3)/s**3
       a4 = mean((x-meanX)**4)/s**4
       SD3 = sqrt(6*(n-2)/((n+1)*(n+3)))
       SD4 = sqrt(24*(n-2)*(n-3)*n/((n+1)**2*(n+3)*(n+5)))
       U3 = a3/SD3
       U4 = (a4-3+6/(n+1))/SD4
       b  = (3*(n**2+27*n-70)*(n+1)*(n+3))/((n-2)*(n+5)*(n+7)*(n+9))
       W2 = sqrt(2*(b-1))-1
       delta = 1/sqrt(log(sqrt(W2)))
       a = sqrt(2/(W2-1))
       Z3 = delta*log((U3/a)+sqrt((U3/a)**2+1))
       B = (6*(n*n-5*n+2)/((n+7)*(n+9)))*sqrt((6*(n+3)*(n+5))/(n*(n-2)*(n-3)))  
       A = 6+(8/B)*((2/B)+sqrt(1+4/(B**2)))
       jm = sqrt(2/(9*A))
       pos = ((1-2/A)/(1+U4*sqrt(2/(A-4))))**(1/3)
       Z4 = (1-2/(9*A)-pos)/jm
       omni = Z3**2+Z4**2
       pomni = 1-pchisq(omni,2)
       df = c(2)
       names(omni) = "Chi2"
       names(df) = "df"
       RVAL = list(
         statistic = omni,
         method = "D'Agostino omnibus normality test",
         parameter = df,
         p.value = pomni,
         data.name = DNAME)
       class(RVAL) = "htest"
       return(RVAL)}
       
    # Result:
    ans = NA
    if (method == "omnibus") ans = omnibus(x, method)
    if (method == "skewness") ans = skewness(x, method)
    if (method == "kurtosis") ans = kurtosis(x, method)
       
    # Return Value:
    ans }


# ******************************************************************************


ansariTest = 
function(x, y, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Ansari-Bradley's test for differences in scale
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Note:
    #   A function linked to "stats"
    
    # FUNCTION:
    
    # Return Value:
    ansari.test(x = x, y = y, ...)
}


# ------------------------------------------------------------------------------


bartlettTest = 
function(x, g, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Bartlett's test for differences in variances
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Note:
    #   # A function linked to "stats"

    # FUNCTION:
    
    # Return Value:
    bartlett.test(x = x, g = g, ...)
}


# ------------------------------------------------------------------------------


corTest = 
function(x, y, alternative = c("two.sided", "less", "greater"),
method = c("pearson", "kendall", "spearman"), ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   A test for association between paired samples
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Note:
    #   # A function linked to "stats"
    
    # FUNCTION:
    
    # Test:
    alternative = alternative[1]
    method = method[1]
    ans = cor.test(x = x, y = y, alternative = alternative, 
    	method = method, ...)
    	
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------
    
    
flignerTest = 
function(x, g, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Fligner-Killeen's test for differences in variances
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Note:
    #   A function linked to "stats"
    
    # FUNCTION:
    
    # Test:
    ans = fligner.test(x = x, g = g, ...)
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


ksTest = 
function(x, y, alternative = c("two.sided", "less", "greater"), ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   One or two sample Kolmogorov-Smirnov tests
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Note:
    #   A function linked to "stats"
    
    # FUNCTION:
    
    # Test:
    alternative = alternative[1]
    ans = ks.test(x = x, y = y, alternative = alternative, ...)
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


moodTest = 
function(x, y, alternative = c("two.sided", "less", "greater"), ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # FUNCTION:
    
    # Test:
    alternative = alternative[1]
    ans = mood.test(x = x, y = y, alternative = alternative, ...)
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


varTest = 
function(x, y, alternative = c("two.sided", "less", "greater"), ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Note:
    #   A function linked to "stats"
    
    # FUNCTION:
    
    # Test:
    alternative = alternative[1]
    ans = var.test(x = x, y = y, alternative = alternative, ...)
    
    # Return Value:
    ans
}


# ******************************************************************************


runsTest = 
function (x)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #	Performs a runs test
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Details:
    #   Implementing Trapletti's tseries R-Package

    # Note:
    #   We consider the signs of x in the series, the zeros will be 
    #   discarded. In addition we have to factor the data for runs.test().
    
    # FUNCTION:
    
    # runs.test() copied from A. Traplettis tseries package
    runs.test = function (x, alternative = c("two.sided", "less", "greater")) {
        if (!is.factor(x)) stop("x is not a factor")
        if (any(is.na(x))) stop("NAs in x")
        if (length(levels(x)) != 2) stop("x does not contain dichotomous data")
        alternative <- match.arg(alternative)
        DNAME <- deparse(substitute(x))
        n <- length(x)
        R <- 1 + sum(as.numeric(x[-1] != x[-n]))
        n1 <- sum(levels(x)[1] == x)
        n2 <- sum(levels(x)[2] == x)
        m <- 1 + 2 * n1 * n2/(n1 + n2)
        s <- sqrt(2 * n1 * n2 * (2 * n1 * n2 - n1 - n2)/((n1 + n2)^2 * 
            (n1 + n2 - 1)))
        STATISTIC <- (R - m)/s
        METHOD <- "Runs Test"
        if (alternative == "two.sided") 
            PVAL <- 2 * pnorm(-abs(STATISTIC))
        else if (alternative == "less") 
            PVAL <- pnorm(STATISTIC)
        else if (alternative == "greater") 
            PVAL <- pnorm(STATISTIC, lower.tail = FALSE)
        else stop("irregular alternative")
        names(STATISTIC) <- "Standard Normal"
        structure(list(
        	statistic = STATISTIC, 
        	alternative = alternative, 
            p.value = PVAL, 
            method = METHOD, 
            data.name = DNAME), 
            class = "htest") }
            
    # Result:
    x = sign(x)
    x = x[x != 0]
    x = factor(x)
    ans = runs.test(x = x) 
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


gofnorm = 
function(x, doprint = TRUE) 
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Distribution: GoF-Tests
    #    1     Omnibus Moments Test for Normality
    #    2     Geary's Test of Normality
    #    3     Studentized Range for Testing Normality
    #    4     D'Agostino's D-Statistic Test of Normality
    #    5     Kuiper V-Statistic Modified to Test Normality
    #    6     Watson U^2-Statistic Modified to Test Normality
    #    7     Durbin's Exact Test (Normal Distribution)
    #    8     Anderson-Darling Statistic Modified to Test Normality
    #    9     Cramer-Von Mises W^2-Statistic to Test Normality
    #   10     Kolmogorov-Smirnov D-Statistic to Test Normality 
    #   11     Kolmogorov-Smirnov D-Statistic (Lilliefors Critical Values)
    #   12     Chi-Square Test of Normality (Equal Probability Classes)
    #   13     Shapiro-Francia W-Test of Normality for Large Samples
    
    # Arguments:
    #   x - a numeric vector of data values.
    
    # Note:
    #   Function Calls:
    #   Fortran:
    #   SUBROUTINE GOFS(x,n,y1,y2,z1,z2,z3,z4,z5,z6,z7)
    #
    
    # FUNCTION:
    
    # Settings:
    lp1 = length(x)+1
        result = .Fortran("gofs",
            as.double(x),
            as.integer(length(x)),
            as.double(rep(0,times=13)),
            as.double(rep(0,times=13)),
            as.double(rep(0,times=lp1)),
            as.double(rep(0,times=lp1)),
            as.double(rep(0,times=lp1)),
            as.double(rep(0,times=lp1)),
            as.double(rep(0,times=lp1)),
            as.double(rep(0,times=lp1)),
            as.double(rep(0,times=lp1)),
            PACKAGE = "fBasics")
        statistics1 = result[[3]]
        statistics2 = rep(NA,times=13)
        statistics2[1] = result[[4]][1]
        statistics2[2] = result[[4]][2]
        statistics2[12] = result[[4]][12] 
            
    # Printing:
    if (doprint) { 
        paste (cat ('\n Omnibus Moments Test               '),
                    cat(c(statistics1[1],statistics2[1])))
        paste (cat ('\n Geary Test                         '),
                    cat(c(statistics1[2],statistics2[2])))
        paste (cat ('\n Studentized Range Test             '),
                    cat(statistics1[3]))
        paste (cat ('\n D\'Agostino D-Statistic Test        '),
                    cat(statistics1[4]))
        paste (cat ('\n Kuiper V-Statistic, Modified       '),
                    cat(statistics1[5]))
        paste (cat ('\n Watson U^2-Statistic, Modified     '),
                    cat(statistics1[6]))
        paste (cat ('\n Durbin Exact Test                  '),
                    cat(statistics1[7]))
        paste (cat ('\n Anderson-Darling Statistic         '),
                    cat(statistics1[8]))
        paste (cat ('\n Cramer-Von Mises W^2-Statistic     '),
                    cat(statistics1[9]))
        paste (cat ('\n Kolmogorov-Smirnov D-Statistic     '),
                    cat(statistics1[10]))
        paste (cat ('\n KS, Lilliefors Critical Values     '),
                    cat(statistics1[11]))
        paste (cat ('\n Chi-Square, Equal Prob. Classes    '),
                    cat(c(statistics1[12],statistics2[12])))
        paste (cat ('\n Shapiro-Francia W-Test             '),
                    cat(statistics1[13]))
        cat("\n\n")}    
    
    # Return Value:
    list(s1 = statistics1, s2 = statistics2)
}


# ------------------------------------------------------------------------------


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA 02111-1307 USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#	  iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#	  General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#	sources obtained from a few dozens of websites


################################################################################
# FUNCTION:		   		DESCRIPTION:
#  acfPlot				 Autocorrelations function plot
#  pacfPlot				 Partial autocorrelation function Plot
#  ccfPlot				 Cross correlation function plot
#  teffectPlot			 Estimates and plots the Taylor Effect
#  lmacfPlot			 Estimates and plots the Long Memory ACF
################################################################################


acfPlot = 
function(x, ...)
{	# A function implemented by Diethelm Wuertz

	# Description:
	#	Autocorrelations function plot
	
	# FUNCTION:
	
	# Return value:
	acf(x = x, ...)
}


# ------------------------------------------------------------------------------


pacfPlot = 
function(x, ...)
{	# A function implemented by Diethelm Wuertz

	# Description:
	#
	
	# FUNCTION:
	
	# Return value:
	pacf(x = x, ...)
}


# ------------------------------------------------------------------------------


ccfPlot = 
function(x, y, ...)
{	# A function implemented by Diethelm Wuertz

	# Description:
	#
	
	# FUNCTION:
	
	# Return value:
	ccf(x = x, y = y, ...)
}


# ------------------------------------------------------------------------------


teffectPlot =
function (x, deltas=seq(from=0.2, to=3.0, by=0.2), lag.max=10, ymax=NA, 
standardize=TRUE)
{	# A function implemented by Diethelm Wuertz
	
	# Description:
  	#	Evaluate and Display Taylor Effect

	# FUNCTION:
	
	# Standardize:
	if(standardize) x = (x-mean(x))/sqrt(var(x))
    	data = matrix(data=rep(0,times=lag.max*length(deltas)),
    	nrow = lag.max, byrow = TRUE)
  	for (id in 1:length(deltas))
    	data[,id] = as.double(acf(abs(x)^deltas[id], 
      		lag.max=lag.max, type="corr", plot=FALSE)$acf)[2:(lag.max+1)]
  	if (is.na(ymax)) ymax = max(data)
  	
  	# Plot:
  	plot(deltas, data[1,], ylim=c(0,ymax), type="n", 
    	xlab="Exponent Delta", ylab="autocorrelation",
    	main="Taylor Effect")
  	xl = 1:length(deltas)
  	for (il in 1:(lag.max)){
	 	yp = max(data[il,])
	 	yl = xl[data[il,]==yp]
    	lines(deltas, data[il,],col=il)
    	points(deltas[yl],yp)
    	lines (c(1,1),c(0,ymax))}
    		
	# Return Value:
  	invisible(data)
}


# ------------------------------------------------------------------------------


lmacfPlot = 
function(x, lag.max = 50, ci = 0.95, main = "ACF", doprint = TRUE)
{	# A function implemented by Diethelm Wuertz
	
	# Description:
  	#	Evaluate and display long memory autocorrelation Function.

	# FUNCTION:
	
	# Compute:
    z = acf(x, lag.max = lag.max, type = "correlation", plot = FALSE)
    z$acf[1] = 0
    cl = qnorm(0.5 + ci/2)/sqrt(z$n.used)
    z.min = min(z$acf, -cl)
  	
    # lin-lin plot excluding one:
    x = seq(0, lag.max, by = 1)
    y = z$acf 
    plot(x = x, y = y, type = "h", main = main, 
      	xlab = "lag", ylab = "ACF", xlim = c(0, lag.max))
    points(x = 0, y = 0)
    if (doprint) {
	cat ('\nLong Memory Autocorrelation Function:\n')
      	paste (cat ('\n  Maximum Lag        '),cat(lag.max))
      	paste (cat ('\n  Cut-Off ConfLevel  '),cat(cl))}
    lines(x=c(0,(lag.max+1)), y=c(cl,cl), lty=2, col=4)
   	
    # log-log:
    x = x[y > cl]
    y = y[y > cl]
   	# log-log:
	if (length(x) < 10) {
		fit = c(NA, NA)
		hurst = NA
		cat("\n  The time series exhibits no long memory! \n") }
	else {
    	plot(x = log(x), y = log(y), type = "l", xlab = "log(lag)", 
      		ylab = "log(ACF)", main = "log-log")
   	fit = lsfit(log(x), log(y))$coefficients
	###	fit = l1fit(log(x), log(y))$coefficients
    abline(fit[1], fit[2], col = 1)
    hurst = 1 + fit[2]/2 
    if (doprint) {
		paste (cat ('\n  Plot-Intercept     '), cat(fit[1]))
      	paste (cat ('\n  Plot-Slope         '), cat(fit[2]))
      	paste (cat ('\n  Hurst Exponent     '), cat(hurst), cat("\n")) } }
      			
	# Return Value:
  	list(fit = fit, hurst = hurst)
}


# ------------------------------------------------------------------------------


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA


# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#     iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#     General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#   sources obtained from a few dozens of websites


################################################################################
# FUNCTION:            FINANCIAL CENTERS:
#  rulesFinCenter       Returns DST rules for a financial center
#  listFinCenter        Lists all supported financial centers
# FUNCTION:            GENERATION OF TIMEDATE OBJECTS:
#  setclass             S4: Class representation for timeDate objects
#  timeDate             S4: Creates a 'timeDate' object from a character vector
#  timeCalendar         S4: Creates a 'timeDate' object from calendar atoms
#  timeSequence         S4: Creates a regularly spaced 'timeDate' objec
#  Sys.timeDate         Returns system time as an object of class 'timeDate'   
# FUNCTION:            SPECIAL MONTHLY SEQUENCES:
#  timeLastDayInMonth   Computes the last day in a given month and year
#  timeNdayOnOrAfter    Computes date in month that is a n-day ON OR AFTER date
#  timeNdayOnOrBefore   Computes date in month that is a n-day ON OR BEFORE date
#  timeNthNdayInMonth   Computes n-th ocurrance of a n-day in year/month
#  timeLastNdayInMonth  Computes the last n-day in year/month
# FUNCTION:            TEST AND REPRESENTATION OF OBJECTS:
#  is.timeDate          Checks if the object is of class 'timeDate'
#  print.timeDate       Prints 'timeDate' including 'FinCenter' and 'Data' Slot
#  summary.timeDate     Summarizes details of a 'timeDate' object
#  format.timeDate      Formats 'timeDate' as ISO conform character string
################################################################################

# IMPORTANT FOR WINDOWS USERS:

#   Set your timezone environment variable to TZ = GMT !!!


# INTRODUCTION:

#   For the management of chronological objects under R three concepts 
#   are available: The first is the implementation of date and time in 
#   Rs "chron" package neglecting locals, time zones and day light saving 
#   times which are not really needed for economic time series. The second 
#   approach, available in Rs base package implements the POSIX standard 
#   to date and time objects, named "POSIXt". Unfortunately, the 
#   representation of these objects is operating system dependent and 
#   especially under MS Windows several problems appear in the management 
#   of time zones and day light saving times. Here we present a solution
#   to overcome these difficulties with POSIX objects and introduce a 
#   new S4 class of 'timeDate' objects which allow for powerful methods 
#   to represent dates and times in different financial centers around 
#   the world. Many of the basic functionalities of these objects are in 
#   common with SPlus 'timeDate' objects and thus many of the programs
#   written for FinMetrics can also be used within R's environment.

#   A major difference is the time zone concept which is replaced by the
#   "financial center" concept. Thus, rules for day light saving times, 
#   holiday calendars, interest rate conventions, and many other aspects
#   can be easily accessed when a financial center is named. So we can 
#   distinguish between Frankfurt and Zurich, which both belong to the 
#   same time zone, but differed in DST changes in the eighties and have
#   differentholiday calendars. Futhermore, since the underlying time 
#   refers to "GMT" and DST rules and all other information is available 
#   in local databases, we are sure, that R delivers with such a time/date 
#   concept on every computer independent of the implementation of the 
#   operating system in use, identical results. 

#   Another important feature of the "timeDate" concept used here is the
#   fact that we don't rely on American or European ways to write dates.
#   We use consequently the ISO-8601 standard for date and time notations.


################################################################################
# FINANCIAL CENTERS:
#   There are two functions concerned with the financial centers. The 
#   first lists the daylight saving rules for a selected financial
#   center, and the second lists all centers available in the database.
#   There is no dependency on the POSIX implementation of your operating
#   system because all time zone and day light saving time information
#   is stored locally in ASCII files. It is important to say, that
#   the "TZ" environment variable must set to "GMT" in your System
#   Environment that there are no conflicts with the POSIX time zone
#   management.


	
rulesFinCenter =
function(FinCenter = myFinCenter)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Show the day light saving rules for a financial center
    
    # Arguments:
    #   FinCenter - a character string with the the location of the  
    #       financial center named as "continent/city". 
    
    # Internal Function for Conversion from Ical Tables:
    if (FALSE) {
	rulesFinCenter2 = 
	function(FinCenter = myFinCenter) {   
		# A function implemented by Diethelm Wuertz	
	    # Description:
	    #   Show the day light saving rules for a financial center	    
	    # Arguments:
	    #   FinCenter - a character string with the the location of the  
	    #       financial center named as "continent/city". 	    
	    # Value:
	    #   Returns a printed list of DST rules.	    
	    # Example:
	    #   > rulesFinCenter("Zurich")
	    #               ruleChanges offSet
	    #   1   1894-05-31 23:30:16   3600
	    #   2   1940-11-01 23:00:00   7200
	    #   3   1940-12-30 22:00:00   3600
	    #   5   1941-10-04 22:00:00   3600
	    #   6   1942-05-03 01:00:00   7200
	    #   7   1942-10-03 22:00:00   3600
	    #   8   1980-12-31 23:00:00   3600
	    #   9   1981-03-29 01:00:00   7200
	    #   ...	    
	    # Note:
	    #   Important, the "TZ" environment variable must set 
	    #   to "GMT" in your Windows Environment!	    
	    # Check Timezone:
	    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
	    if (FinCenter == "") FinCenter = "GMT"	    
	    # Read the Rules:
	    # Get IcalPath from .FirstLib
	    file = paste(IcalPath, FinCenter, sep = "")
	    zfile <- zip.file.extract(file, "Rdata.zip")
	    ical = read.table(zfile, skip = 2)	            
	    # GMT Offsets:
	    hm = as.integer(ical[,6])
	    sg = sign(hm)
	    hm = abs(hm)
	    h = floor(hm/100)
	    hms.off = sg * ( floor(hm/100)*3600 + (hm - 100*h)*60 + 0 )
	    hms.off	 
	    # When have the rules changed?
	    months.num = 1:12
	    names(months.num) = c(
	        "Jan", "Feb", "Mar", "Apr", "May", "Jun", 
	        "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
	    Y = as.integer(ical[,4])
	    m = as.integer(months.num[as.character(ical[,3])])
	    d = as.integer(ical[,2])
	    CCYYMMDD = as.character(Y*10000+100*m+d)
	    hms = unlist(strsplit(as.character(ical[,5]), ":"))
	    hms = matrix(as.integer(hms), byrow=TRUE, ncol=3)
	    hms = 1000000 + 10000*hms[,1] + 100*hms[,2] + hms[,3]
	    hhmmss = substr(as.character(hms), 2, 7)
	    ruleChangesGMT = strptime(paste(CCYYMMDD, hhmmss), "%Y%m%d %H%M%S")
	    attr(ruleChangesGMT, "tzone") <- "GMT"	    
	    # Return Value:
	    data.frame(ruleChanges = as.character(ruleChangesGMT), 
	    	offSet = hms.off) } 
	}
       
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    # if (FinCenter == "") FinCenter = "GMT"
	   
	City = strsplit(FinCenter, "/")[[1]][length(strsplit(FinCenter, "/")[[1]])]
	fun = match.fun(City)
	
	# Return Value:
	fun()
}  


# ------------------------------------------------------------------------------


listFinCenter = 
function(pattern = "*")
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   List available Time Zones in Database
    
    # Arguments:
    #   pattern - a pattern character string which can be recognized
    #       by the 'grep' functs. Wild cards are allowed.
    
    # Value:
    #   Returns a printed list of financia centers. 
    
    # Example:
    #   > listFinCenter("Europe/*")
    #    [1] "Europe/Amsterdam"   "Europe/Andorra"     "Europe/Athens"     
    #    [4] "Europe/Belfast"     "Europe/Belgrade"    "Europe/Berlin"     
    #    [7] "Europe/Bratislava"  "Europe/Brussels"    "Europe/Bucharest"  
    #   [10] "Europe/Budapest"    "Europe/Chisinau"    "Europe/Copenhagen" 
    #   [13] "Europe/Dublin"      "Europe/Gibraltar"   "Europe/Helsinki"   
    #   [16] "Europe/Istanbul"    ...   
    
    # Note:
    #   The timezone database is required.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Load Database:
    # require(fBasics)
    data(timezones.db)
    tz = as.character(unclass(timezones.db)$TIMEZONES)
    
    # Financial Centers:
    result = as.character(tz[grep(pattern = pattern, x = tz)])
    
    # Return Value:
    result
}
    

################################################################################
# GENERATION OF TIME DATE OBJECTS:   
#   We have defined a 'timeDate' class which is in many aspects similar
#   to the S-Plus class with the same name, but has also some important
#   differeneces. The class has four Slots, the 'Data' slot which holds 
#   date and time as 'POSIXlt' objects, the 'Dim' slot which gives the
#   length of the object, the 'format' specification and 'FinCenter' the 
#   the name of the financial center. Three functions allow to cgenerate
#   date/time objects: 'timeDate' from character vectors, 'timeCalendar'
#   from date and time atoms, and 'timeSequence' from a sequence 
#   specification. Note, time zone transformation is easily handled by
#   by the 'timeDate' functions which can also take 'timeDate' and
#   'POSIXt' objects as inputs, while transforming them between financial
#   centers and/or time zones specified by the arguments 'zone' and
#   'FinCenter'. Finally the function 'Sys.timeDate' returns system
#   time in form of a 'timeDate' object.


require(methods)


setClass("timeDate", 
    # A class implemented by Diethelm Wuertz
    
    # Description:
    #   Class representatation for 'timeDate' Objects.
    
    # CLASS:
    
    representation(
        Data = "POSIXlt",
        Dim = "numeric",
        format = "character",
        FinCenter = "character"
    )    
)   
    
  
# ------------------------------------------------------------------------------
   

timeDate = 
function(charvec, format = NULL, zone = "GMT", FinCenter = myFinCenter) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Creates a "timeDate' object from a character vector
    
    # Arguments:
    #   charvec - a character vector of dates and times.
    #   format - the format specification of the input character 
    #       vector.
    #   zone - the time zone or financial center where the data were 
    #       recorded.
    #   FinCenter - a character string with the the location of the  
    #       financial center named as "continent/city". 
    
    # Value:
    #   Returns a S4 object of class 'timeDate'.
    
    # Examples:
    #   timeDate("2004-01-01") 
    #   timeDate("2004-01-01 00:00:00")
    #   timeDate("20040101")     
    #   timeDate("20040101000000")
    #   timeDate("1/1/2004") # American format
    #   timeDate("2004-01-01", FinCenter = "GMT")   
    #   timeDate("20040101", FinCenter = "GMT") 
    #   td = timeDate("2004-01-01", FinCenter = "GMT"); timeDate(td)
    #   td = timeDate("20040101", FinCenter = "GMT"); timeDate(td)
     
    # FUNCTION:

    # Trace:
    trace = FALSE
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    if (FinCenter == "") FinCenter = "GMT"
        
    # If charvec is of type "timeDate" extract data slot:
    if (inherits(charvec, "sdate")) {
        charvec = as.character(charvec)
        format = "%Y%m%d"
        zone = FinCenter }
    if (inherits(charvec, "timeDate")) 
        charvec = charvec@Data   
    # If charvec is of type "POSIXt" convert to character string:
    if (inherits(charvec, "POSIXt")) 
        charvec = format(charvec, "%Y-%m-%d %H:%M:%S") 
    
    # Dimension
    Dim = length(charvec)
        
    # ISO Format:
    iso.format = "%Y-%m-%d %H:%M:%S"
    if (is.character(charvec) & is.null(format)) {
        nchar.iso = mean(nchar(charvec))
        if (nchar.iso == 10) format = "%Y-%m-%d" 
        if (nchar.iso == 19) format = "%Y-%m-%d %H:%M:%S"
        if (nchar.iso ==  8) format = "%Y%m%d"
        if (nchar.iso == 14) format = "%Y%m%d%H%M%S"
        if (regexpr("/", charvec[1])[[1]] > 0) format = "%m/%d/%Y" }
        
    # Convert "charvec" to standard ISO format:
    charvec = format(strptime(charvec, format), iso.format) 
    
    # Trace Input:
    if (trace) { cat("\nInput: "); print(recFinCenter); print(charvec) }
    # Financial Centers:
    recFinCenter = zone # Time zone where the data were recorded
    useFinCenter = FinCenter # Time zone where the data were used

    # Internal Function:
    formatFinCenter = 
    function(charvec, FinCenter, type = c("gmt2any", "any2gm")){    
        # Description:
        #   Transformation of timeDate character vectors between
        #   financial centers
        # Arguments:
        #   charvec - ISO character vector as "%Y-%m-%d %H:%M:%S"
        #   format - the character string with format specification
        #   FinCenter - the Financial center as "Continent/City"
        #   type - what to convert, either "gmt2any", or "any2gm"
        # Value:
        #   returns an ISO character vector as "%Y-%m-%d %H:%M:%S"
        # FUNCTION:
        # Convert what?
        type = type[1]
        signum = 0
        if (type == "gmt2any") signum = +1 
        if (type == "any2gmt") signum = -1      
        # Convert:
        if (FinCenter != "GMT") {
            center = rulesFinCenter(FinCenter)
            center1 = as.character(center[,1])
            center2 = as.character(center[,2])      
            charchanges = center1[!is.na(center1)]              
            o = order(c(charchanges, charvec))
            nRC = length(charchanges)
            nME = length(charvec)
            center2 = center2[!is.na(center1)] 
            ishms = c(as.integer(center2), rep(NA, length = nME)) 
            x = (1:(nRC+nME))[!is.na(ishms[o])]
            xout = (1:(nRC+nME))[is.na(ishms[o])]
            y = ishms[o][!is.na(ishms[o])] 
            offSets = approx(x = x, y = y , xout, method = "constant")$y    
            dt = strptime(charvec, "%Y-%m-%d %H:%M:%S")             
            ans = format(dt + signum * offSets, format="%Y-%m-%d %H:%M:%S") }
        else {
            ans = charvec }
        # Return Value:
        ans }
    
    # Convert:    
    DEBUG = FALSE
    if (recFinCenter == "GMT" && useFinCenter == "GMT") {       
        if (DEBUG) print("if - 1:")
        if (trace) { 
            cat("\nOutput: ")
            print(useFinCenter)
            print(charvec); cat("\n") }
        lt = strptime(charvec, iso.format)
        timeTest = sum(lt$hour) + sum(lt$min) + sum(lt$sec) 
        if (timeTest == 0) iso.format = "%Y-%m-%d"
        return(new("timeDate", 
            Data = lt, 
            Dim = as.integer(Dim),
            format = iso.format,
            FinCenter = useFinCenter)) }  
             
    if (recFinCenter == "GMT" && useFinCenter != "GMT") {
        if (DEBUG) print("if - 2:") 
        charvec = formatFinCenter(charvec, useFinCenter, type = "gmt2any")
        if (trace) { 
            cat("\nOutput: ")
            print(useFinCenter)
            print(charvec); cat("\n") }
        lt = strptime(charvec, iso.format)
        timeTest = sum(lt$hour) + sum(lt$min) + sum(lt$sec) 
        if (timeTest == 0) iso.format = "%Y-%m-%d"
        return(new("timeDate", 
            Data = lt, 
            Dim = as.integer(Dim),
            format = iso.format,
            FinCenter = useFinCenter)) }    
                
    if (recFinCenter != "GMT" && useFinCenter == "GMT") {
        if (DEBUG) print("if - 3:")
        charvec = formatFinCenter(charvec, recFinCenter, type = "any2gmt")
        if (trace) { 
            cat("\nOutput: ")
            print(useFinCenter)
            print(charvec); cat("\n") }
        lt = strptime(charvec, iso.format)
        timeTest = sum(lt$hour) + sum(lt$min) + sum(lt$sec) 
        if (timeTest == 0) iso.format = "%Y-%m-%d"
        return(new("timeDate", 
            Data = lt, 
            Dim = as.integer(Dim),
            format = iso.format,
            FinCenter = useFinCenter)) }      
                
    if (recFinCenter == useFinCenter) {     
        if (DEBUG) print("if - 4:")
        if (trace) { 
            cat("\nOutput: ")
            print(useFinCenter)
            print(charvec); cat("\n") }
        lt = strptime(charvec, iso.format)
        timeTest = sum(lt$hour) + sum(lt$min) + sum(lt$sec) 
        if (timeTest == 0) iso.format = "%Y-%m-%d"
        return(new("timeDate", 
            Data = lt,
            Dim = as.integer(Dim),
            format = iso.format ,
            FinCenter = useFinCenter)) }    
            
    if (recFinCenter != useFinCenter) {
        if (DEBUG) print("if - 5:")
        charvec = formatFinCenter(charvec, recFinCenter, type = "any2gmt")
        charvec = formatFinCenter(charvec, useFinCenter, type = "gmt2any")
        if (trace) { 
            cat("\nOutput: ") 
            print(useFinCenter); 
            print(charvec); cat("\n") }
        lt = strptime(charvec, iso.format)
        timeTest = sum(lt$hour) + sum(lt$min) + sum(lt$sec) 
        if (timeTest == 0) iso.format = "%Y-%m-%d"
        return(new("timeDate", 
            Data = lt, 
            Dim = as.integer(Dim),
            format = iso.format,
            FinCenter = useFinCenter)) }    
            
    # Return Value:
    invisible()         
}


# ------------------------------------------------------------------------------


timeCalendar = 
function(y = currentYear, m = 1:12, d = NULL, h = NULL, min = NULL, 
s = NULL, FinCenter = myFinCenter)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Creates a 'timeDate' object from calendar atoms
    
    # Arguments:
    #   y - calendar years (e.g. 1997), defaults are 1960. 
    #   m - calendar months (1-12), defaults are 1. 
    #   d - calendar days (1-31), defaults are 1. 
    #   h - hours of the days (0-23), defaults are 0. 
    #   min - minutes of the days (0-59), defaults are 0. 
    #   s - seconds of the days (0-59), defaults are 0. 
    #   FinCenter - a character sting with the the location of the  
    #       financial center named as "continent/city"  
    
    # Value:
    #   Returns a 'timeDate' object corresponding to the "atomic" 
    #   inputs. For the default arguments the first day in each 
    #   month of the current year will be returned.
    
    # Details:
    #   Creates a 'timeDate' object from date as month, day, year and
    #   time of day as hours, and minutes [seconds, milliseconds]
    
    # Note:
    #   The 'zone' where the data were recorded is fixed to myFincenter!
    #   The argument list has ISO-8601 ordering!
    #   ms - Milliseconds is not supported.
    
    # Example:
    #   x = timeCalendar(y = 2000, h = rep(16,12)) 
    #   x = timeCalendar(m = c(3,4,5), d = c(12,15,7), y = c(1998,1997,2004)) 
    #   x = timeCalendar(h = c(9,14), min = c(15,23)) 
  
    # FUNCTION:
    
    # Trace:
    trace = FALSE
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    if (FinCenter == "") FinCenter = "GMT"
    
    # Check Input:
    len = c(length(m), length(d), length(y), length(h), length(min), length(s))
    data.len = max(len)
    if (data.len < 1) 
        stop("No arguments defined!")
    if (any((data.len %% len[len > 0]) != 0))
        stop("Arguments have incompatible lengths")
    
    # Make All Arguments the Same Length:
    if (len[1] == 0) m = 1
    if (len[2] == 0) d = 1
    if (len[3] == 0) y = 1960
    if (len[4] == 0) h = 0
    if (len[5] == 0) min = 0
    if (len[6] == 0) s = 0
    
    # Presettings:
    m = rep(m, length = data.len)
    d = rep(d, length = data.len)
    y = rep(y, length = data.len)
    h = rep(h, length = data.len)
    min = rep(min, length = data.len)
    s = rep(s, length = data.len)
    
    # Date-Time Strings:
    # Note Format is always of type  "%Y%m%d%H%M%S"  !
    
    CCYYMMDD = as.integer(y*10000 + m*100 + d)
    chardate = as.character(CCYYMMDD)
    hhmmss = as.integer(1000000 + h*10000 + min*100 + s)
    chartime = substr(as.character(hhmmss), 2, 7)
    charvec = paste(as.vector(chardate), as.vector(chartime), sep = "") 
    
    # Return Value:  
    timeDate(charvec = charvec, format = "%Y%m%d%H%M%S", 
        zone = FinCenter, FinCenter = FinCenter) 
}


# ------------------------------------------------------------------------------


timeSequence = 
function(from = "2004-01-01", to = format(Sys.time(), "%Y-%m-%d"), 
by = "day", length.out = NULL, format = "", FinCenter = myFinCenter)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Creates a regularly spaced 'timeDate' object
    
    # Arguments:
    #   from - starting date. Required.
    #   to - end date. Optional. If supplied must be after from.
    #   by - a character string, containing one of "sec", "min",
    #       "hour", "day", "week", "month" or "year".
    #       This can optionally be preceded by an integer and a
    #       space, or followed by "s". 
    #   length.out - length.out integer, optional. Desired length  
    #       of the sequence, if specified "to" will be ignored.
    #   format - the format specification of the input character 
    #       vector.
    #   FinCenter - a character string with the the location of the  
    #       financial center named as "continent/city".  
    
    # Value:
    #   Returns a 'timeDate' object corresponding to the "sequence" 
    #   specification. 
    
    # Note:
    #   The 'zone' where the data were recorded is fixed to myFincenter!
    
    # Example:
    #   x = timeSequence("2004-01-28", "2004-02-04", by = "day")
    #   x = timeSequence("2004-01-31", "2005-01-31", by = "month")
    #   x = timeSequence("2004-01-28", by = "day", length.out = 10)
    #   x = timeSequence("2004-01-31", by = "month", length.out = 12))   
    #   x = timeSequence("2004-01-28 18:00:00", "2004-01-29 06:00:00", 
    #       format = "%Y-%m-%d %H:%M:%S", by = "hour")
    #   x = timeSequence("2004-01-28 18:00:00", 
    #       format = "%Y-%m-%d %H:%M:%S", by = "hour", length.out = 10)
        
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    if (FinCenter == "") FinCenter = "GMT"
    
    # Convert Quarters:
    if (by == "quarters") by = "3 months"
    
    # Auto-detect Input Format:
    format.from = format.to = format
    if (is.character(from) & is.null(format)) {
        nchar.iso = mean(nchar(from))
        if (nchar.iso == 10) format.from = "%Y-%m-%d" 
        if (nchar.iso == 19) format.from = "%Y-%m-%d %H:%M:%S"
        if (nchar.iso ==  8) format.from = "%Y%m%d"
        if (nchar.iso == 14) format.from = "%Y%m%d%H%M%S"
        if (regexpr("/", from[1])[[1]] > 0) format.from = "%m/%d/%Y" }
    if (is.character(to) & is.null(format)) {
        nchar.iso = mean(nchar(to))
        if (nchar.iso == 10) format.to = "%Y-%m-%d" 
        if (nchar.iso == 19) format.to = "%Y-%m-%d %H:%M:%S"
        if (nchar.iso ==  8) format.to = "%Y%m%d"
        if (nchar.iso == 14) format.to = "%Y%m%d%H%M%S"
        if (regexpr("/", to[1])[[1]] > 0) format.to = "%m/%d/%Y" }
    format = format.from
    if (format != format.to)
        stop ("Args from and to must have the same format specification.")
    
    # Create Charvector:  
    from = strptime(as.character(from), format = format) 
    iso.format = "%Y-%m-%d %H:%M:%S"
    if (is.null(length.out)) {
        # The start "from" and end date "to" must be specified!
        to = strptime(as.character(to), format = format)
        charvec = format(seq.POSIXt(from = from, 
            to = to, by = by), iso.format) }
    else  {
        # The end date is missing and has to be specified
        charvec = format(seq.POSIXt(from = from, 
            by = by, length.out = length.out), iso.format) }
            
    # Create timeDate Object:  
    ans = timeDate(charvec = charvec, format = NULL, 
        zone = FinCenter, FinCenter = FinCenter) 
        
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


Sys.timeDate =
function(FinCenter = myFinCenter) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Returns system time as an object of class 'timeDate'
    
    # Arguments:
    #   FinCenter - a character string with the the location of the  
    #       financial center named as "continent/city"   
    
    # Value:
    #   Returns the system time as an object of class 'timeDate'.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    if (FinCenter == "") FinCenter = "GMT"
    
    # Get System Time:
    ans = timeDate(as.character(Sys.time()), zone = "GMT", 
        FinCenter = FinCenter)
        
    # Return Value:
    ans
    
}

 
################################################################################
# SPECIAL MONTHLY TIME DATE SEQUENCES:
#   We have implemented five functions to generate special monthly 
#   sequences. These are functions to compute the last day in a given 
#   month and year, to compute the dates in amonth that is a n-day 
#   ON OR AFTER a given date, to compute the dates in a month that 
#   is a n-day ON OR BEFORE a specified date, to compute the n-th 
#   ocurrances of a n-day for a specified year/month vectors, and 
#   finally to compute the last n-day for a specified year/month
#   value or vector.


timeLastDayInMonth = 
function(charvec, format = "%Y-%m-%d", FinCenter = "GMT")
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Computes the last day in a given month and year
    
    # Arguments:
    #   charvec - a character vector of dates and times.
    #   format - the format specification of the input character 
    #       vector.
    #   FinCenter - a character string with the the location of the  
    #       financial center named as "continent/city". 
    
    # Value:
    #   Returns the last day in a given month and year as a
    #   'timeDate' object.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    if (FinCenter == "") FinCenter = "GMT"
    
    # Last day of month:
    last.day = c(31,28,31, 30,31,30, 31,31,30, 31,30,31)
    lt = strptime(charvec, format)
    y = 1900 + lt$year
    leap.year = (y%%4 == 0 & (y%%100 != 0 | y%%400 == 0))
    leap.day = as.integer(leap.year)*as.integer(lt$mon == 1)
    lt$mday = last.day[1 + lt$mon] + leap.day
    
    # Return Value:
    timeDate(lt, format = "%Y-%m-%d", zone = FinCenter, 
        FinCenter = FinCenter)
}

    
# ------------------------------------------------------------------------------


timeNdayOnOrAfter = 
function(charvec, nday = 1, format = "%Y-%m-%d", FinCenter = "GMT")
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Computes date in month that is a n-day ON OR AFTER 
    
    # Arguments:
    #   charvec - a character vector of dates and times.
    #   nday - an integer vector with entries ranging from 
    #       0 (Sunday) to 6 (Saturday).
    #   format - the format specification of the input character 
    #       vector.
    #   FinCenter - a character string with the the location of the  
    #       financial center named as "continent/city". 
    
    # Value:
    #   Returns the date in month that is a n-day ON OR AFTER as
    #   a 'timeDate' object.
    
    # Details:
    #   nday = 1 is a Monday
    
    # Example: 
    #   What date has the first Monday on or after March 15, 1986?
    #   OnOrAfter("1986-03-15", 1)
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    if (FinCenter == "") FinCenter = "GMT"
    
    # timeDate:
    lt = strptime(charvec, format)
    
    # On or after:
    ct = 24*3600*(as.integer(julian.POSIXt(lt)) + (nday-lt$wday)%%7)
    class(ct) = "POSIXct"
    
    # Return Value:
    timeDate(format(ct), format = format, zone = FinCenter, 
        FinCenter = FinCenter)
}


# ------------------------------------------------------------------------------


timeNdayOnOrBefore = 
function(charvec, nday = 1, format = "%Y-%m-%d", FinCenter = "GMT")
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Computes date in month that is a n-day ON OR BEFORE 

    # Arguments:
    #   charvec - a character vector of dates and times.
    #   nday - an integer vector with entries ranging from 
    #       0 (Sunday) to 6 (Saturday).
    #   format - the format specification of the input character 
    #       vector.
    #   FinCenter - a character string with the the location of the  
    #       financial center named as "continent/city". 
    
    # Value:
    #   Returns the date in month that is a n-day ON OR BEFORE
    #   as a 'timeDate' object.
    
    # Example: 
    #   What date has Friday on or before April 22, 1977?
    
    # FUNCTION: 
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    if (FinCenter == "") FinCenter = "GMT"
    
    # timeDate:
    lt = strptime(charvec, format)
    
    # On or after:
    ct = 24*3600*(as.integer(julian.POSIXt(lt)) - (-(nday-lt$wday))%%7)
    class(ct) = "POSIXct"
    
    # Return Value:
    timeDate(format(ct), format = format, zone = FinCenter, 
        FinCenter = FinCenter)
}


# ------------------------------------------------------------------------------


timeNthNdayInMonth = 
function(charvec, nday = 1, nth = 1, format = "%Y-%m-%d", FinCenter = "GMT")
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Computes "nth" ocurrance of a "nday" (nth = 1,...,5) 
    #   in "year,month"
 
    # Arguments:
    #   charvec - a character vector of dates and times.
    #   nday - an integer vector with entries ranging from 
    #       0 (Sunday) to 6 (Saturday).
    #   nth - an integer vector numbering the n-th occurence.
    #   format - the format specification of the input character 
    #       vector.
    #   FinCenter - a character string with the the location of the  
    #       financial center named as "continent/city". 
    
    # Value:
    #   Returns the "nth" ocurrance of a "nday" (nth = 1,...,5) 
    #   in "year,month" as a 'timeDate' object.
    
    # Example: 
    #   What date is the second Monday in April 2004?
    
    # FUNCTION: 
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    if (FinCenter == "") FinCenter = "GMT"
    
    # timeDate:
    lt = strptime(charvec, format)
    
    # On or after:
    lt1 = lt
    lt1$mday = 1
    ct = 24*3600*(as.integer(julian.POSIXt(lt)) + (nth-1)*7 + 
        (nday-lt1$wday)%%7)
    class(ct) = "POSIXct"

    # Return Value:
    timeDate(format(ct), format = format, zone = FinCenter, 
        FinCenter = FinCenter)
}


# ------------------------------------------------------------------------------


timeLastNdayInMonth = 
function(charvec, nday = 1, format = "%Y-%m-%d", FinCenter = "GMT")
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Computes the last "nday" in "year/month"
    
    # Arguments:
    #   charvec - a character vector of dates and times.
    #   nday - an integer vector with entries ranging from 
    #       0 (Sunday) to 6 (Saturday).
    #   format - the format specification of the input character 
    #       vector.
    #   FinCenter - a character string with the the location of the  
    #       financial center named as "continent/city". 
    
    # Value:
    #   Returns the last "nday" in "year/month" as a 'timeDate' 
    #   object.
    
    # Example: 
    #   What date has the last Monday in May, 1996?
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    if (FinCenter == "") FinCenter = "GMT"
    
    # Last Day:
    last.day = c(31,28,31, 30,31,30, 31,31,30, 31,30,31)
    lt = strptime(charvec, format)
    y = 1900 + lt$year
    leap.year = (y%%4 == 0 & (y%%100 != 0 | y%%400 == 0))
    leap.day = as.integer(leap.year)*as.integer(lt$mon == 1)
    lt$mday = last.day[1 + lt$mon] + leap.day
    ct = 24*3600*(as.integer(julian.POSIXt(lt)) - (-(nday-lt$wday))%%7)
    class(ct) = "POSIXct"

    # Return Value:
    timeDate(format(ct), format = format, zone = FinCenter,
        FinCenter = FinCenter)
}


################################################################################
# TESTS AND REPRESENTATION OF OBJECTS:
#   We have implemented four S3 methods to test and represent 'timeDate'
#   objects. The methods check if a given object is of class 'timeDate',
#   print 'timeDate' objects including 'FinCenter' and 'Data' Slot,
#   summarize details of a 'timeDate' object, and format 'timeDate' 
#   objects as ISO conform formatted character strings.


is.timeDate = 
function(object) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Checks if object is of class 'timeDate'
    
    # Arguments:
    #   object - a 'timeDate' object to be checked.
    
    # Value:
    #   Returns 'TRUE' or 'FALSE' depending on whether its
    #   argument is of 'timeDate' type or not.
 
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Object:
    ans = inherits(object, "timeDate")
    
    # Return Value:
    ans
}
    

# ------------------------------------------------------------------------------


print.timeDate =
function(x, ...) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Prints FinCenter and timeDate for a 'timeDate' object
    
    # Arguments:
    #   x - a 'timeDate' object to be printed.
    #   ... - arguments passed to other methods.
    
    # Value:
    #   Returns a printed report on 'timeDate' objects.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Print:
    print(x@FinCenter)
    layout = paste("[", as.character(x@Data), "]", sep = "")
    
    # Return Value:
    print(layout, quote = FALSE, ...) 
}   
    

# ------------------------------------------------------------------------------


summary.timeDate = 
function(object, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Summarizes details of a 'timeDate' object
    
    # Arguments:
    #   x - a 'timeDate' object to be summarized.
    
    # Value:
    #   Returns a summary report of the details of a 'timeDate'
    #   object.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Print:
    x = object
    cat("\nObject:       ", as.character(match.call())[2])
    cat("\nFirstRecord:  ", as.character(start(x)))
    cat("\nEndRecord:    ", as.character(end(x)))
    cat("\nObservations: ", length(as.character(td)))
    cat("\nFormat:       ", x@format)
    cat("\nFinCenter:    ", x@FinCenter)
    cat("\n")
    
    # Return Value:
    invisible()
}


# ------------------------------------------------------------------------------


format.timeDate = 
function(x, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Formats 'timeDate' as ISO conform character string
    
    # Arguments:
    #   x - a 'timeDate' object
    
    # Value:
    #   Returns an ISO conform formatted character string.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Format:
    # format.POSIXlt(x, format = "", usetz = FALSE, ...) 
    ans = format.POSIXlt(x@Data, ...)
    # print(x@FinCenter)    
    
    # Return Value:
    ans
}


################################################################################


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#     iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#     General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#   sources obtained from a few dozens of websites


################################################################################
# S3 MEHOD:              MATHEMATICAL OPERATIONS:
#  [.timeDate             Extracts or replaces subsets from 'timeDate' Objects
#  +.timeDate             Performs arithmetic + operation on 'timeDate' objects
#  -.timeDate             Performs arithmetic - operation on 'timeDate' objects
#  Ops.timeDate           Group 'Ops' generic functions for 'timeDate' objects
#  diff.timeDate          Returns suitably lagged and iterated differences
#  difftimeDate           Returns a difference of two 'timeDate' objects
#  c.timeDate             Concatenates objects of class 'timeDate'
#  rep.timeDate           Replicates objects of class 'timeDate'
#  start.timeDate         Extracts the first object of a 'timeDate' vector
#  end.timeDate           Extracts the last object of a 'timeDate' vector
#  modify.timeDate        Sorts, Rounds or truncates a 'timeDate' vector
#  rev.timeDate           Reverts  a 'timeDate' vector object
# S3 MEHOD:              OBJECT TRANSFORMATION:
#  as.character.timeDate  Returns a 'timeDate' object as character string
#  as.data.frame.timeDate Returns a 'timeDate' object as data frame
#  as.POSIXct.timeDate    Returns a 'timeDate' object as POSIXct object
#  julian.timeDate        Returns Julian day counts since 1970-01-01
#  atoms.timeDate         Returns date/time atoms from a 'timeDate' object
#  months.timeDate        Extract months atom from a 'timeDate' object
################################################################################


################################################################################
# MATHEMATICAL OPERATIONS:
#   This is a collection of S3 methods for objects of class 'timeDate'.
#   Included are methods to extracts or replace subsets from 'timeDate' 
#   objects, to perform arithmetic "+" and "-" operations, to group 
#   'Ops' generic functions, to return suitably lagged and iterated 
#   differences, to return differences of two 'timeDate' objects, to
#   to xoncatenate objects, to replicate objects, to rounds objects,
#   to truncates objects, to extract the first or last object of a
#   vector, to ort the objects the elements of a vector, and to revert
#   'timeDate' vector objects.


"[.timeDate" =
function(x, ..., drop = TRUE)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Extracts or replaces subsets from 'timeDate' objects
    
    # Arguments:
    #   x - a 'timeDate' object
    
    # Value:
    #   Returns a subset from a 'timeDate' object.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Subsets:
    val <- lapply(x@Data, "[", ..., drop = drop)
    attributes(val) <- attributes(x@Data) 
    
    # Return Value:
    new("timeDate", 
        Data = val, 
        Dim = length(as.character(val)),
        format = x@format,
        FinCenter = x@FinCenter)      
}   


# ------------------------------------------------------------------------------


"+.timeDate" =
function(e1, e2)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Performs arithmetic "+" operation on 'timeDate' objects.
    
    # Arguments:
    #   e1 - an object of class 'timeDate'
    #   e2 - an object of class 'numeric'
    
    # Value:
    #   Returns a 'timeDate' object "e2" seconds later than the
    #   'timeDate' object "e1". 
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Types:
    test1 = test2 = 1
    if (inherits(e1, "timeDate")) test1 = 0
    if (inherits(e2, "numeric"))  test2 = 0
    if (test1 + test2 != 0) stop("Wrong class types") 
    
    # Convert to GMT:
    e1GMT = timeDate(e1, zone = e1@FinCenter, FinCenter = "GMT")@Data
    
    # Add and Convert back to FinCenter:
    ans = timeDate(e1GMT+e2, zone = "GMT", FinCenter = e1@FinCenter)
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


"-.timeDate" = 
function(e1, e2)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Performs arithmetic "-" operation on 'timeDate' objects
    
    # Arguments:
    #   e1 - an object of class 'timeDate'
    #   e2 - an object of class 'timeDate' or of class 'numeric'
    
    # Value:
    #   Returns a 'difftime' object if both "e1" and "e2" are
    #   'timeDate' objects, or returns a 'timeDate' object "e2"
    #   seconds earlier than "e1".
    
    # Example:
    #   charvec = c("2004-01-01 16:00:00", "2004-01-01 18:00:00")
    #   x = timeDate(charvec, zone = "GMT", FinCenter = "Europe/Zurich")
    
    # FUNCTION:
     
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Types:
    test1 = test2 = 1
    if (inherits(e1, "timeDate")) test1 = 0
    if (inherits(e2, "timeDate")) test2 = 0
    if (inherits(e2, "numeric"))  test2 = 0
    if (test1 + test2 != 0) stop("Wrong class types") 
    
    # First Object:
    e1GMT = timeDate(e1, zone = e1@FinCenter, FinCenter = "GMT")@Data
    if (inherits(e2, "timeDate")) {
        e2 = timeDate(e2, zone = e2@FinCenter, FinCenter = "GMT")@Data
        # Returns difftime:
        return(e1GMT-e2) }
    if (inherits(e2, "numeric")) {
        # Returns timeDate:
        return(timeDate(e1GMT-e2, zone = "GMT", FinCenter = e1@FinCenter)) }
        
    # Return Value:
    invisible()         
}


# ------------------------------------------------------------------------------


Ops.timeDate = 
function(e1, e2)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Uses group 'Ops' generic functions for 'timeDate' objects

    # Arguments:
    #   e1 - an object of class 'timeDate'
    #   e2 - an object of class 'timeDate' 
    
    # Value:
    #   Returns the 'Ops' grouped object.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Logical Operators:
    if (nargs() == 1)
        stop(paste("unary", .Generic, "not defined for timeDate objects"))
    boolean <- switch(.Generic, "<" = , ">" = , "==" = ,
        "!=" = , "<=" = , ">=" = TRUE, FALSE)
    if (!boolean) 
        stop(paste(.Generic, "not defined for timeDate XXX objects"))   
        
    # Convert to GMT:
    e1GMT = timeDate(e1, zone = e1@FinCenter, FinCenter = "GMT")@Data
    e2GMT = timeDate(e2, zone = e2@FinCenter, FinCenter = "GMT")@Data
    
    # Convert to Julian:
    if (inherits(e1GMT, "POSIXlt")) e1 <- as.POSIXct(e1GMT)
    if (inherits(e2GMT, "POSIXlt")) e2 <- as.POSIXct(e2GMT)
    
    # Return Value:
    NextMethod(.Generic)
}


# ------------------------------------------------------------------------------


diff.timeDate =
function (x, lag = 1, differences = 1, ...) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Returns suitably lagged and iterated differences
    
    # Arguments:
    #   x - a 'timeDate' object.
    #   lag - an integer indicating which lag to use, by 
    #       default 1.
    #   differences - an integer indicating the order of the 
    #       difference, by default 1.
    #   ... - further arguments to be passed to or from methods.
  
    # Value:
    #   If 'x' is a vector of length 'n' and 'differences=1', then 
    #   the computed result is equal to the successive differences
    #   'x[(1+lag):n] - x[1:(n-lag)]'.
    #   If 'difference' is larger than one this algorithm is applied
    #   recursively to 'x'. Note that the returned value is a vector 
    #   which is shorter than 'x'.

    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Convert to GMT:
    xGMT = timeDate(x, zone = x@FinCenter, FinCenter = "GMT") 
        
    # Return Value:
    diff.POSIXt(x = as.POSIXct(xGMT@Data), xGMT@Data, lag = lag, 
        differences = differences, ...) 
}



# ------------------------------------------------------------------------------


difftimeDate = 
function(time1, time2, 
units = c("auto", "secs", "mins", "hours", "days", "weeks")) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Takes a difference of two 'timeDate' objects
    
    # Arguments:
    #   time1, time2 - 'timeDate' objects.
    #   units - a character string. The units in which the results 
    #       are desired, one of the following: "auto", "secs", 
    #       "mins", "hours", "days", "weeks"
    
    # Value:
    #   'difftimeDate' takes a difference of two 'timeDate' 
    #   objects and returns an object of class 'difftime' with
    #   an attribute indicating the units. 

    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Convert to GMT:
    time1GMT = timeDate(time1, zone = time1@FinCenter, 
        FinCenter = "GMT") 
    time2GMT = timeDate(time2, zone = time2@FinCenter, 
        FinCenter = "GMT") 

    # Return Value:
    difftime(time1GMT@Data, time2GMT@Data, tz = "GMT", units = units[1]) 
}


# ------------------------------------------------------------------------------


c.timeDate = 
function(..., recursive = FALSE)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Concatenates objects of class 'timeDate'
    
    # Arguments:
    #   ... - objects to be concatenated.
    #   recursive - a logical. If 'recursive=TRUE', the function 
    #       recursively descends through lists combining all their 
    #       elements into a vector.
    
    # Value:
    #   Returns all arguments to be coerced to a 'timeDate' object  
    #   which is the type of the returned value.

    # Details:
    #   This is a generic function which combines its arguments.

    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
        
    # List all:
    z = list(...)
    
    # Convert to GMT character vectors:
    all = NULL
    for (i in 1:length(z)) {
        new = format(timeDate(z[[i]], zone = z[[i]]@FinCenter, 
            FinCenter = "GMT")@Data, "%Y-%m-%d %H:%M:%S")
        all = c(all, new) }
    
    # Convert to Financial Center of the first element:
    ans = timeDate(all, zone = "GMT", FinCenter = z[[1]]@FinCenter)
    
    # Return Value:
    ans
}
  
    
# ------------------------------------------------------------------------------


rep.timeDate =
function(x, times, ...) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Replicates objects of class 'timeDate'
    
    # Arguments:
    #   x - a 'timeDate' object
    #   times - a non-negative integer.  A vector giving the number 
    #       of times to repeat each element if of length 'length(x)', 
    #       or to repeat the whole vector if of length 1.
    
    # Value:
    #   Returns a vector of repeated elements belonging to the same 
    #   class as 'x'.
    
    # FUNCTION:

    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Type:
    if (!inherits(x, "timeDate")) stop("Wrong class type")
    
    # Convert to GMT:
    xGMT = timeDate(x, zone = x@FinCenter, FinCenter = "GMT") 
    
    # Repeats:  
    lt = rep.POSIXlt(xGMT@Data, times = times, ...)
    
    # Convert to timeDate:
    ans = timeDate(lt, zone="GMT", FinCenter = x@FinCenter)
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


start.timeDate =
function(x, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Extracts the first object of a 'timeDate' vector

    # Arguments:
    #   x - a 'timeDate' object
    
    # Value:
    #   Returns from 'x' the earliest entry as an object of class 
    #   'timeDate'.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Type:
    if (!inherits(x, "timeDate")) stop("Wrong class type")
    
    # First element:
    # print(x@FinCenter)
    xGMT = timeDate(x, zone=x@FinCenter, FinCenter="GMT")@Data
    z = as.numeric(as.POSIXct(xGMT))
    order(z)[1]
    
    # Return Value:
    x[1]
}


# ------------------------------------------------------------------------------


end.timeDate =
function(x, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Extracts the last object of a 'timeDate' vector

    # Arguments:
    #   x - a 'timeDate' object
    
    # Value:
    #   Returns an object of class 'timeDate'.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Type:
    if (!inherits(x, "timeDate")) stop("Wrong class type")
    
    # Last element:
    # print(x@FinCenter)
    xGMT = timeDate(x, zone=x@FinCenter, FinCenter="GMT")@Data
    z = as.numeric(as.POSIXct(xGMT))
    n = order(z)[length(z)]
    
    # Return Value:
    x[n]
}


# ------------------------------------------------------------------------------


modify.timeDate =
function(x, method = c("sort", "round", "trunc"), units = c("secs", 
"mins", "hours", "days"))
{	# A function implemented by Diethelm Wuertz

    # Description:
    #   Sorts, rounds or truncates a 'timeDate' vector
    
	# Select:
	method = method[1]
	units = units[1]
	
	# Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Type:
    if (!inherits(x, "timeDate")) stop("Wrong class type")
    
	# Internal Function:
	sort.timeDate = 
	function(x) {  
	    # Description:
	    #   Time-sorts the objects of a 'timeDate' vector   
	    # Arguments:
	    #   x - a 'timeDate' object to be sorted.
	    #   ... - arguments passed to other methods.    
	    # Value:
	    #   Returns a sorted object of the same class as 'x'.
	    # Sort elements:
	    xGMT = timeDate(x, zone = x@FinCenter, FinCenter = "GMT")@Data
	    z = as.numeric(as.POSIXct(xGMT))
	    n = order(z)  
	    # Return Value:
	    x[n] }
	    
	# Internal Function
	round.timeDate = 
	function(x, units) {   
	    # Description:
	    #   Rounds objects of class 'timeDate'
	    # Arguments:
	    #   x - a 'timeDate' object
	    #   units - a character string, one of the units listed, 
	    #       by default "secs".
	    # Value:
	    #   Returns a rounded object of class 'timeDate'.
	    # Round:
	    xGMT = timeDate(x, zone = x@FinCenter, FinCenter = "GMT") 
	    lt = round.POSIXt(xGMT@Data, units = units) 
	    ans = timeDate(lt, zone = "GMT", FinCenter = x@FinCenter)   
	    # Return Value:
	    ans }

	# Internal Function
	trunc.timeDate = 
	function(x, units) {
	    # Description:
	    #   Truncates objects of class 'timeDate'
	    # Arguments:
	    #   x - a 'timeDate' object
	    #   units - one of the units listed, by default "secs". 
	    # Value:
	    #   Returns a truncated object of class 'timeDate'.
	    # Truncate:
	    xGMT = timeDate(x, zone = x@FinCenter, FinCenter = "GMT") 
	    lt = trunc.POSIXt(xGMT@Data, units = units) 
	    ans = timeDate(lt, zone = "GMT", FinCenter = x@FinCenter)  
	    # Return Value:
	    ans }
	    
	# Modify:
	ans = NA
	if (method == "sort")  return(sort.timeDate(x))
	if (method == "round") return(round.timeDate(x, units))
	if (method == "trunc") return(trunc.timeDate(x, units))
	
	# Return Value:
	ans  
}


# ------------------------------------------------------------------------------


rev.timeDate =
function(x)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Reverts  a 'timeDate' vector object.
    
    # Arguments:
    #   x - a 'timeDate' object
    
    # Value:
    #   Returns 'x' as a 'timeDate' object in reversed order.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Type:
    if (!inherits(x, "timeDate")) stop("Wrong class type")
    
    # Revert elements:
    x@Data = rev(x@Data)
    
    # Return Value:
    x
}

    
################################################################################
# TRANSFORMATIONS MEHODS:
#   This is a collection of S3 methods for objects of class 'timeDate'.
#   Included are methods to transform 'timeDate' objects to character 
#   strings, to data frames, to POSIXct or POSIXlt objects, to Julian
#   counts, to extract date/time atoms from calendar dates, and to 
#   extract the months atom from a 'timeDate' object.


as.character.timeDate =
function(x, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Returns a 'timeDate' object as character string
    
    # Arguments:
    #   x - a 'timeDate' object
    #   ... - arguments passed to other methods.
    
    # Value:
    #   Returns 'x' as a character vector. 

    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Type:
    if (!inherits(x, "timeDate")) stop("Wrong class type")
    
    # Format:
    ans = format.POSIXlt(x@Data)
    # print(x@FinCenter)
    
    # Return Value: 
    ans
}


# ------------------------------------------------------------------------------


as.data.frame.timeDate =
function(x, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Returns a 'timeDate' object as data frame
    
    # Arguments:
    #   x - a 'timeDate' object
    
    # Value:
    #   Returns 'x' as a data frame.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Type:
    if (!inherits(x, "timeDate")) stop("Wrong class type")
    
    # Data Frame:
    ans = as.data.frame.POSIXlt(x@Data, ...)
    # print(x@FinCenter)
    
    # Return Value: 
    ans
}


# ------------------------------------------------------------------------------


as.POSIXct.timeDate =
function(x, tz = "")
{# A function implemented by Diethelm Wuertz

    # Description:
    #   Returns a 'timeDate' object as POSIXct object
    
    # Arguments:
    #   x - a 'timeDate' object
    #   tz - a timezone specification to be used for the conversion.
    #       (Not needed when used for 'timeDate' conversions.)
    
    # Value:
    #   Returns 'x' as an object of class 'POSIXct'.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Type:
    if (!inherits(x, "timeDate")) stop("Wrong class type")
    
    # POSIXlt:
    ans = as.POSIXct.POSIXlt(x@Data)
    
    # Return Value: 
    ans
}


# ******************************************************************************

 
julian.timeDate = 
function(x, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Extracts Julian time in days since 1970-01-01
    
    # Arguments:
    #   x - a 'timeDate' object
    #   units - a character string, one of the units listed, 
    #       by default "secs".
    
    # Value:
    #   Returns the number of days (possibly fractional) since
    #   the origin.
    
    # Details:
    #   The origin is "1970-01-01 00:00:00 GMT"

    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Type:
    if (!inherits(x, "timeDate")) stop("Wrong class type")
    
    # Fixed Units:
    if (!exists("myUnits")) units = "secs" else units = myUnits
    
    # POSIX:
    lt = timeDate(x, zone = x@FinCenter, FinCenter = "GMT")@Data

    # Difftime:  
    origin = as.POSIXlt("1970-01-02", tz = "GMT") - 24 * 3600
    res = difftime(as.POSIXct(lt), origin, units = units[1])
    ans = structure(res, origin = origin)
        
    # Return Value:
    ans
}
	

# ------------------------------------------------------------------------------


atoms.timeDate = 
function(x, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Extracts atoms from a 'timeDate' object.
    
    # Arguments:
    #   x - a 'timeDate' object from which to extract the
    #       calendar "atoms".
    
    # Value:
    #   Returns a data.frame with the following calendar atoms:
    #   Y(ear), m(onth), d(ay), H(our), M(inutes), S(econds).
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Type:
    if (!inherits(x, "timeDate")) stop("Wrong class type")
    
    # mdy:
    x = x@Data
    Y = x$year + 1900
    m = x$mon + 1
    d = x$mday
    H = x$hour
    M = x$min
    S = x$sec
    
    # Data Frame:
    ans = data.frame(Y = Y, m = m, d = d, H = H, M = M, S = S)
    # print(x@FinCenter)
    
    # Return Value: 
    ans
}


# ------------------------------------------------------------------------------


months.timeDate =
function(x, abbreviate = NULL)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Extracts months atom from a timeDate object

    # Arguments:
    #   x - a 'timeDate' object from which to extract the
    #       month "atom".
    
    # Value:
    #   Returns the month from a 'timeDate' object as an integer
    #   value or vector with elements ranging between 1 and 12,
    #   numbering the months from January to December.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Check Class Type:
    if (!inherits(x, "timeDate")) stop("Wrong class type")
    
    # Month:
    ans = x@Data$mon+1
    
    # Return Value:
    ans
}
    

################################################################################


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA


#
# The following DST Rules were extracted from Libical library and 
# integrated into R functions. 
# Libical is an Open Source implementation of the iCalendar protocols
# and protocol data units.
# The code and datafiles are licensed under the terms of the GNU 
# Library General Public License. 
#


# AFRICA -----------------------------------------------------------------------


"Algiers" <- function() {
structure(list(Algiers = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, NA, 15, 16, NA, 17, 18, 19, NA, 
20, 21, 22, NA, 23, NA, 24, 25, NA, 26, NA)), 
.Label = c(                                   "1911-03-10 23:50:39", 
"1916-06-14 23:00:00", "1916-10-01 23:00:00", "1917-03-24 23:00:00", 
"1917-10-07 23:00:00", "1918-03-09 23:00:00", "1918-10-06 23:00:00", 
"1919-03-01 23:00:00", "1919-10-05 23:00:00", "1920-02-14 23:00:00", 
"1920-10-23 23:00:00", "1921-03-14 23:00:00", "1921-06-21 23:00:00", 
"1939-09-11 23:00:00", "1940-02-25 02:00:00", "1944-04-03 01:00:00", 
"1945-04-02 01:00:00", "1945-09-15 23:00:00", "1946-10-06 23:00:00", 
"1963-04-13 23:00:00", "1971-04-25 23:00:00", "1971-09-26 23:00:00", 
"1977-10-20 23:00:00", "1978-09-22 01:00:00", "1979-10-25 23:00:00", 
"1980-10-31 01:00:00"), class = "factor"), offSet = c(0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
7200, 3600, 7200, 3600, 0, 3600, 0, 3600, 0, 3600, 3600, 7200, 
3600, 0, 3600, 0, 3600)), .Names = c("Algiers", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33"), class = "data.frame") }


"Cairo" <- function() {
structure(list(Cairo = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, NA, 18, NA, 19, NA, 
20, NA, 21, NA, 22, NA, 23, NA, 24, NA, 25, NA, 26, NA, 27, NA, 
28, NA, 29, NA, 30, NA, 31, NA, 32, NA, 33, NA, 34, NA, 35, NA, 
36, NA, 37, NA, 38, NA, 39, NA, 40, NA, 41, NA, 42, NA, 43, NA, 
44, NA, 45, NA, 46, NA, 47, NA, 48, NA, 49, NA, 50, NA, 51, NA, 
52, NA, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 
67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 
83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 
99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124
)), .Label = c("1940-07-14 22:00:00", "1940-09-30 21:00:00", 
"1941-04-14 22:00:00", "1941-09-15 21:00:00", "1942-03-31 22:00:00", 
"1942-10-26 21:00:00", "1943-03-31 22:00:00", "1943-10-31 21:00:00", 
"1944-03-31 22:00:00", "1944-10-31 21:00:00", "1945-04-15 22:00:00", 
"1945-10-31 21:00:00", "1957-05-09 22:00:00", "1957-09-30 21:00:00", 
"1958-04-30 22:00:00", "1958-09-30 21:00:00", "1959-04-30 23:00:00", 
"1960-04-30 23:00:00", "1961-04-30 23:00:00", "1962-04-30 23:00:00", 
"1963-04-30 23:00:00", "1964-04-30 23:00:00", "1965-04-30 23:00:00", 
"1966-04-30 23:00:00", "1967-04-30 23:00:00", "1968-04-30 23:00:00", 
"1969-04-30 23:00:00", "1970-04-30 23:00:00", "1971-04-30 23:00:00", 
"1972-04-30 23:00:00", "1973-04-30 23:00:00", "1974-04-30 23:00:00", 
"1975-04-30 23:00:00", "1976-04-30 23:00:00", "1977-04-30 23:00:00", 
"1978-04-30 23:00:00", "1979-04-30 23:00:00", "1980-04-30 23:00:00", 
"1981-04-30 23:00:00", "1982-07-24 23:00:00", "1983-07-11 23:00:00", 
"1984-04-30 23:00:00", "1985-04-30 23:00:00", "1986-04-30 23:00:00", 
"1987-04-30 23:00:00", "1988-04-30 23:00:00", "1989-05-05 23:00:00", 
"1990-04-30 23:00:00", "1991-04-30 23:00:00", "1992-04-30 23:00:00", 
"1993-04-30 23:00:00", "1994-04-30 23:00:00", "1995-04-27 22:00:00", 
"1995-09-28 21:00:00", "1996-04-25 22:00:00", "1996-09-26 21:00:00", 
"1997-04-24 22:00:00", "1997-09-25 21:00:00", "1998-04-23 22:00:00", 
"1998-09-24 21:00:00", "1999-04-29 22:00:00", "1999-09-30 21:00:00", 
"2000-04-27 22:00:00", "2000-09-28 21:00:00", "2001-04-26 22:00:00", 
"2001-09-27 21:00:00", "2002-04-25 22:00:00", "2002-09-26 21:00:00", 
"2003-04-24 22:00:00", "2003-09-25 21:00:00", "2004-04-29 22:00:00", 
"2004-09-30 21:00:00", "2005-04-28 22:00:00", "2005-09-29 21:00:00", 
"2006-04-27 22:00:00", "2006-09-28 21:00:00", "2007-04-26 22:00:00", 
"2007-09-27 21:00:00", "2008-04-24 22:00:00", "2008-09-25 21:00:00", 
"2009-04-23 22:00:00", "2009-09-24 21:00:00", "2010-04-29 22:00:00", 
"2010-09-30 21:00:00", "2011-04-28 22:00:00", "2011-09-29 21:00:00", 
"2012-04-26 22:00:00", "2012-09-27 21:00:00", "2013-04-25 22:00:00", 
"2013-09-26 21:00:00", "2014-04-24 22:00:00", "2014-09-25 21:00:00", 
"2015-04-23 22:00:00", "2015-09-24 21:00:00", "2016-04-28 22:00:00", 
"2016-09-29 21:00:00", "2017-04-27 22:00:00", "2017-09-28 21:00:00", 
"2018-04-26 22:00:00", "2018-09-27 21:00:00", "2019-04-25 22:00:00", 
"2019-09-26 21:00:00", "2020-04-23 22:00:00", "2020-09-24 21:00:00", 
"2021-04-29 22:00:00", "2021-09-30 21:00:00", "2022-04-28 22:00:00", 
"2022-09-29 21:00:00", "2023-04-27 22:00:00", "2023-09-28 21:00:00", 
"2024-04-25 22:00:00", "2024-09-26 21:00:00", "2025-04-24 22:00:00", 
"2025-09-25 21:00:00", "2026-04-23 22:00:00", "2026-09-24 21:00:00", 
"2027-04-29 22:00:00", "2027-09-30 21:00:00", "2028-04-27 22:00:00", 
"2028-09-28 21:00:00", "2029-04-26 22:00:00", "2029-09-27 21:00:00", 
"2030-04-25 22:00:00", "2030-09-26 21:00:00"), class = "factor"), 
offSet = c(10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200)), 
.Names = c("Cairo", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150", "151", 
"152", "153", "154", "155", "156", "157", "158", "159", "160"
), class = "data.frame") }


"Casablanca" <- function() {
structure(list(Casablanca = structure(as.integer(c(NA, 1, NA, 
2, NA, 3, 4, 5, NA, 6, NA, 7, NA, 8, NA, 9, NA, 10)), .Label = c(                                   "1939-11-18 23:00:00", 
"1945-11-17 23:00:00", "1950-10-28 23:00:00", "1967-06-03 12:00:00", 
"1967-09-30 23:00:00", "1974-08-31 23:00:00", "1976-07-31 23:00:00", 
"1977-09-27 23:00:00", "1978-08-03 23:00:00", "1985-12-31 23:00:00"
), class = "factor"), offSet = c(3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0)), .Names = c("Casablanca", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18"), 
class = "data.frame") }


"Johannesburg" <- function() {
structure(list(Johannesburg = structure(as.integer(c(1, NA, 2, 
NA, 3)), .Label = c("1903-02-28 22:30:00", "1943-03-20 23:00:00", 
"1944-03-18 23:00:00"), class = "factor"), offSet = c(7200, 10800, 
7200, 10800, 7200)), .Names = c("Johannesburg", "offSet"), row.names = c("1", 
"2", "3", "4", "5"), class = "data.frame") }


"Lagos" <- function() {
structure(list(Lagos = structure(as.integer(1), .Label = "1919-08-31 23:46:24", 
class = "factor"), offSet = 3600), .Names = c("Lagos", "offSet"), 
row.names = "1", class = "data.frame") }


"Nairobi" <- function() {
structure(list(Nairobi = structure(as.integer(c(1, 2, 3)), .Label = 
c("1929-12-31 21:00:00", "1939-12-31 21:30:00", "1959-12-31 21:15:00"), 
class = "factor"), offSet = c(9000, 9900, 10800)), .Names = c("Nairobi", 
"offSet"), row.names = c("1", "2", "3"), class = "data.frame") }


"Tunis" <- function() { 
structure(list(Tunis = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, NA, 9, NA, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
21, 22, 23)), .Label = c("1911-03-10 23:50:39", "1939-04-15 22:00:00", 
"1939-11-18 22:00:00", "1940-02-25 22:00:00", "1941-10-05 22:00:00", 
"1942-03-08 23:00:00", "1942-11-02 01:00:00", "1943-03-29 01:00:00", 
"1943-04-25 01:00:00", "1944-04-03 01:00:00", "1944-10-07 22:00:00", 
"1945-04-02 01:00:00", "1945-09-15 22:00:00", "1977-04-29 23:00:00", 
"1977-09-23 23:00:00", "1978-04-30 23:00:00", "1978-09-30 23:00:00", 
"1988-05-31 23:00:00", "1988-09-24 23:00:00", "1989-03-25 23:00:00", 
"1989-09-23 23:00:00", "1990-04-30 23:00:00", "1990-09-29 23:00:00"
), class = "factor"), offSet = c(3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600)), .Names = c("Tunis", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25"), class = "data.frame") }


# AMERICA ----------------------------------------------------------------------


"Anchorage" <- function() {
structure(list(Anchorage = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132)), .Label = c("1900-08-20 21:59:36", 
"1942-01-01 10:00:00", "1942-02-09 12:00:00", "1945-08-14 23:00:00", 
"1945-09-30 11:00:00", "1946-01-01 10:00:00", "1967-04-01 10:00:00", 
"1969-01-01 10:00:00", "1969-04-27 12:00:00", "1969-10-26 11:00:00", 
"1970-04-26 12:00:00", "1970-10-25 11:00:00", "1971-04-25 12:00:00", 
"1971-10-31 11:00:00", "1972-04-30 12:00:00", "1972-10-29 11:00:00", 
"1973-04-29 12:00:00", "1973-10-28 11:00:00", "1974-01-06 12:00:00", 
"1974-10-27 11:00:00", "1975-02-23 12:00:00", "1975-10-26 11:00:00", 
"1976-04-25 12:00:00", "1976-10-31 11:00:00", "1977-04-24 12:00:00", 
"1977-10-30 11:00:00", "1978-04-30 12:00:00", "1978-10-29 11:00:00", 
"1979-04-29 12:00:00", "1979-10-28 11:00:00", "1980-04-27 12:00:00", 
"1980-10-26 11:00:00", "1981-04-26 12:00:00", "1981-10-25 11:00:00", 
"1982-04-25 12:00:00", "1982-10-31 11:00:00", "1983-04-24 12:00:00", 
"1983-10-30 11:00:00", "1984-04-29 11:00:00", "1984-10-28 10:00:00", 
"1985-04-28 11:00:00", "1985-10-27 10:00:00", "1986-04-27 11:00:00", 
"1986-10-26 10:00:00", "1987-04-05 11:00:00", "1987-10-25 10:00:00", 
"1988-04-03 11:00:00", "1988-10-30 10:00:00", "1989-04-02 11:00:00", 
"1989-10-29 10:00:00", "1990-04-01 11:00:00", "1990-10-28 10:00:00", 
"1991-04-07 11:00:00", "1991-10-27 10:00:00", "1992-04-05 11:00:00", 
"1992-10-25 10:00:00", "1993-04-04 11:00:00", "1993-10-31 10:00:00", 
"1994-04-03 11:00:00", "1994-10-30 10:00:00", "1995-04-02 11:00:00", 
"1995-10-29 10:00:00", "1996-04-07 11:00:00", "1996-10-27 10:00:00", 
"1997-04-06 11:00:00", "1997-10-26 10:00:00", "1998-04-05 11:00:00", 
"1998-10-25 10:00:00", "1999-04-04 11:00:00", "1999-10-31 10:00:00", 
"2000-04-02 11:00:00", "2000-10-29 10:00:00", "2001-04-01 11:00:00", 
"2001-10-28 10:00:00", "2002-04-07 11:00:00", "2002-10-27 10:00:00", 
"2003-04-06 11:00:00", "2003-10-26 10:00:00", "2004-04-04 11:00:00", 
"2004-10-31 10:00:00", "2005-04-03 11:00:00", "2005-10-30 10:00:00", 
"2006-04-02 11:00:00", "2006-10-29 10:00:00", "2007-04-01 11:00:00", 
"2007-10-28 10:00:00", "2008-04-06 11:00:00", "2008-10-26 10:00:00", 
"2009-04-05 11:00:00", "2009-10-25 10:00:00", "2010-04-04 11:00:00", 
"2010-10-31 10:00:00", "2011-04-03 11:00:00", "2011-10-30 10:00:00", 
"2012-04-01 11:00:00", "2012-10-28 10:00:00", "2013-04-07 11:00:00", 
"2013-10-27 10:00:00", "2014-04-06 11:00:00", "2014-10-26 10:00:00", 
"2015-04-05 11:00:00", "2015-10-25 10:00:00", "2016-04-03 11:00:00", 
"2016-10-30 10:00:00", "2017-04-02 11:00:00", "2017-10-29 10:00:00", 
"2018-04-01 11:00:00", "2018-10-28 10:00:00", "2019-04-07 11:00:00", 
"2019-10-27 10:00:00", "2020-04-05 11:00:00", "2020-10-25 10:00:00", 
"2021-04-04 11:00:00", "2021-10-31 10:00:00", "2022-04-03 11:00:00", 
"2022-10-30 10:00:00", "2023-04-02 11:00:00", "2023-10-29 10:00:00", 
"2024-04-07 11:00:00", "2024-10-27 10:00:00", "2025-04-06 11:00:00", 
"2025-10-26 10:00:00", "2026-04-05 11:00:00", "2026-10-25 10:00:00", 
"2027-04-04 11:00:00", "2027-10-31 10:00:00", "2028-04-02 11:00:00", 
"2028-10-29 10:00:00", "2029-04-01 11:00:00", "2029-10-28 10:00:00", 
"2030-04-07 11:00:00", "2030-10-27 10:00:00"), class = "factor"), 
offSet = c(-36000, -36000, -32400, -32400, -36000, -36000, 
-36000, -36000, -32400, -36000, -32400, -36000, -32400, -36000, 
-32400, -36000, -32400, -36000, -32400, -36000, -32400, -36000, 
-32400, -36000, -32400, -36000, -32400, -36000, -32400, -36000, 
-32400, -36000, -32400, -36000, -32400, -36000, -32400, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400, -28800, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400, -28800, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400, -28800, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400, -28800, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400, -28800, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400, -28800, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400, -28800, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400, -28800, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400, -28800, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400, -28800, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400, -28800, -32400, 
-28800, -32400, -28800, -32400, -28800, -32400)), .Names = c("Anchorage", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132"), class = "data.frame") }


"Bogota" <- function() {
structure(list(Bogota = structure(as.integer(c(1, 2, 3)), 
.Label = c("1914-11-23 04:56:20", "1992-05-02 05:00:00", 
"1992-12-31 04:00:00"), class = "factor"), offSet = c(-18000, -14400, -18000)), 
.Names = c("Bogota", "offSet"), row.names = c("1", "2", "3"), 
class = "data.frame") }


"BuenosAires" <- function() {
structure(list(BuenosAires = structure(as.integer(c(1, 2, 3, 
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68
)), .Label = c("1920-05-01 04:16:44", "1930-12-01 04:00:00", 
"1931-04-01 03:00:00", "1931-10-15 04:00:00", "1932-03-01 03:00:00", 
"1932-11-01 04:00:00", "1933-03-01 03:00:00", "1933-11-01 04:00:00", 
"1934-03-01 03:00:00", "1934-11-01 04:00:00", "1935-03-01 03:00:00", 
"1935-11-01 04:00:00", "1936-03-01 03:00:00", "1936-11-01 04:00:00", 
"1937-03-01 03:00:00", "1937-11-01 04:00:00", "1938-03-01 03:00:00", 
"1938-11-01 04:00:00", "1939-03-01 03:00:00", "1939-11-01 04:00:00", 
"1940-03-01 03:00:00", "1940-07-01 04:00:00", "1941-06-15 03:00:00", 
"1941-10-15 04:00:00", "1943-08-01 03:00:00", "1943-10-15 04:00:00", 
"1946-03-01 03:00:00", "1946-10-01 04:00:00", "1963-10-01 03:00:00", 
"1963-12-15 04:00:00", "1964-03-01 03:00:00", "1964-10-15 04:00:00", 
"1965-03-01 03:00:00", "1965-10-15 04:00:00", "1966-03-01 03:00:00", 
"1966-10-15 04:00:00", "1967-04-01 03:00:00", "1967-10-01 04:00:00", 
"1968-04-07 03:00:00", "1968-10-06 04:00:00", "1969-04-06 03:00:00", 
"1969-10-05 04:00:00", "1974-01-23 03:00:00", "1974-05-01 02:00:00", 
"1974-10-06 03:00:00", "1975-04-06 02:00:00", "1975-10-05 03:00:00", 
"1976-04-04 02:00:00", "1976-10-03 03:00:00", "1977-04-03 02:00:00", 
"1985-11-02 03:00:00", "1986-03-14 02:00:00", "1986-10-25 03:00:00", 
"1987-02-13 02:00:00", "1987-10-25 03:00:00", "1988-02-07 02:00:00", 
"1988-12-01 03:00:00", "1989-03-05 02:00:00", "1989-10-15 03:00:00", 
"1990-03-04 02:00:00", "1990-10-21 03:00:00", "1991-03-03 02:00:00", 
"1991-10-20 03:00:00", "1992-03-01 02:00:00", "1992-10-18 03:00:00", 
"1993-03-07 02:00:00", "1999-10-03 03:00:00", "2000-03-03 03:00:00"
), class = "factor"), offSet = c(-14400, -10800, -14400, -10800, 
-14400, -10800, -14400, -10800, -14400, -10800, -14400, -10800, 
-14400, -10800, -14400, -10800, -14400, -10800, -14400, -10800, 
-14400, -10800, -14400, -10800, -14400, -10800, -14400, -10800, 
-14400, -10800, -14400, -10800, -14400, -10800, -14400, -10800, 
-14400, -10800, -14400, -10800, -14400, -10800, -7200, -10800, 
-7200, -10800, -7200, -10800, -7200, -10800, -7200, -10800, -7200, 
-10800, -7200, -10800, -7200, -10800, -7200, -10800, -7200, -10800, 
-7200, -10800, -7200, -10800, -10800, -10800)), .Names = c("Buenos_Aires", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68"), class = "data.frame") }


"Caracas" <- function() {
structure(list(Caracas = structure(as.integer(c(1, 2)), .Label = 
c("1912-02-12 04:27:44", "1965-01-01 04:30:00"), class = "factor"), 
offSet = c(-16200, -14400)), .Names = c("Caracas", "offSet"), 
row.names = c("1", "2"), class = "data.frame") }


"Cayman" <- function() {
structure(list(Cayman = structure(as.integer(1), .Label = 
"1912-02-01 05:07:12", class = "factor"), offSet = -18000), 
.Names = c("Cayman", "offSet"), row.names = "1", class = "data.frame") }


"Chicago" <- function() {
structure(list(Chicago = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 
141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 
154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 
167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 
180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 
193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 
206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 
219, 220, 221, 222, 223, 224, 225)), .Label = c("1918-03-31 08:00:00", 
"1918-10-27 07:00:00", "1919-03-30 08:00:00", "1919-10-26 07:00:00", 
"1920-01-01 06:00:00", "1920-06-13 08:00:00", "1920-10-31 07:00:00", 
"1921-03-27 08:00:00", "1921-10-30 07:00:00", "1922-04-30 08:00:00", 
"1922-09-24 07:00:00", "1923-04-29 08:00:00", "1923-09-30 07:00:00", 
"1924-04-27 08:00:00", "1924-09-28 07:00:00", "1925-04-26 08:00:00", 
"1925-09-27 07:00:00", "1926-04-25 08:00:00", "1926-09-26 07:00:00", 
"1927-04-24 08:00:00", "1927-09-25 07:00:00", "1928-04-29 08:00:00", 
"1928-09-30 07:00:00", "1929-04-28 08:00:00", "1929-09-29 07:00:00", 
"1930-04-27 08:00:00", "1930-09-28 07:00:00", "1931-04-26 08:00:00", 
"1931-09-27 07:00:00", "1932-04-24 08:00:00", "1932-09-25 07:00:00", 
"1933-04-30 08:00:00", "1933-09-24 07:00:00", "1934-04-29 08:00:00", 
"1934-09-30 07:00:00", "1935-04-28 08:00:00", "1935-09-29 07:00:00", 
"1936-03-01 08:00:00", "1936-11-15 07:00:00", "1937-04-25 08:00:00", 
"1937-09-26 07:00:00", "1938-04-24 08:00:00", "1938-09-25 07:00:00", 
"1939-04-30 08:00:00", "1939-09-24 07:00:00", "1940-04-28 08:00:00", 
"1940-09-29 07:00:00", "1941-04-27 08:00:00", "1941-09-28 07:00:00", 
"1942-01-01 06:00:00", "1942-02-09 08:00:00", "1945-08-14 23:00:00", 
"1945-09-30 07:00:00", "1946-01-01 06:00:00", "1946-04-28 08:00:00", 
"1946-09-29 07:00:00", "1947-04-27 08:00:00", "1947-09-28 07:00:00", 
"1948-04-25 08:00:00", "1948-09-26 07:00:00", "1949-04-24 08:00:00", 
"1949-09-25 07:00:00", "1950-04-30 08:00:00", "1950-09-24 07:00:00", 
"1951-04-29 08:00:00", "1951-09-30 07:00:00", "1952-04-27 08:00:00", 
"1952-09-28 07:00:00", "1953-04-26 08:00:00", "1953-09-27 07:00:00", 
"1954-04-25 08:00:00", "1954-09-26 07:00:00", "1955-04-24 08:00:00", 
"1955-10-30 07:00:00", "1956-04-29 08:00:00", "1956-10-28 07:00:00", 
"1957-04-28 08:00:00", "1957-10-27 07:00:00", "1958-04-27 08:00:00", 
"1958-10-26 07:00:00", "1959-04-26 08:00:00", "1959-10-25 07:00:00", 
"1960-04-24 08:00:00", "1960-10-30 07:00:00", "1961-04-30 08:00:00", 
"1961-10-29 07:00:00", "1962-04-29 08:00:00", "1962-10-28 07:00:00", 
"1963-04-28 08:00:00", "1963-10-27 07:00:00", "1964-04-26 08:00:00", 
"1964-10-25 07:00:00", "1965-04-25 08:00:00", "1965-10-31 07:00:00", 
"1966-04-24 08:00:00", "1966-10-30 07:00:00", "1967-01-01 06:00:00", 
"1967-04-30 08:00:00", "1967-10-29 07:00:00", "1968-04-28 08:00:00", 
"1968-10-27 07:00:00", "1969-04-27 08:00:00", "1969-10-26 07:00:00", 
"1970-04-26 08:00:00", "1970-10-25 07:00:00", "1971-04-25 08:00:00", 
"1971-10-31 07:00:00", "1972-04-30 08:00:00", "1972-10-29 07:00:00", 
"1973-04-29 08:00:00", "1973-10-28 07:00:00", "1974-01-06 08:00:00", 
"1974-10-27 07:00:00", "1975-02-23 08:00:00", "1975-10-26 07:00:00", 
"1976-04-25 08:00:00", "1976-10-31 07:00:00", "1977-04-24 08:00:00", 
"1977-10-30 07:00:00", "1978-04-30 08:00:00", "1978-10-29 07:00:00", 
"1979-04-29 08:00:00", "1979-10-28 07:00:00", "1980-04-27 08:00:00", 
"1980-10-26 07:00:00", "1981-04-26 08:00:00", "1981-10-25 07:00:00", 
"1982-04-25 08:00:00", "1982-10-31 07:00:00", "1983-04-24 08:00:00", 
"1983-10-30 07:00:00", "1984-04-29 08:00:00", "1984-10-28 07:00:00", 
"1985-04-28 08:00:00", "1985-10-27 07:00:00", "1986-04-27 08:00:00", 
"1986-10-26 07:00:00", "1987-04-05 08:00:00", "1987-10-25 07:00:00", 
"1988-04-03 08:00:00", "1988-10-30 07:00:00", "1989-04-02 08:00:00", 
"1989-10-29 07:00:00", "1990-04-01 08:00:00", "1990-10-28 07:00:00", 
"1991-04-07 08:00:00", "1991-10-27 07:00:00", "1992-04-05 08:00:00", 
"1992-10-25 07:00:00", "1993-04-04 08:00:00", "1993-10-31 07:00:00", 
"1994-04-03 08:00:00", "1994-10-30 07:00:00", "1995-04-02 08:00:00", 
"1995-10-29 07:00:00", "1996-04-07 08:00:00", "1996-10-27 07:00:00", 
"1997-04-06 08:00:00", "1997-10-26 07:00:00", "1998-04-05 08:00:00", 
"1998-10-25 07:00:00", "1999-04-04 08:00:00", "1999-10-31 07:00:00", 
"2000-04-02 08:00:00", "2000-10-29 07:00:00", "2001-04-01 08:00:00", 
"2001-10-28 07:00:00", "2002-04-07 08:00:00", "2002-10-27 07:00:00", 
"2003-04-06 08:00:00", "2003-10-26 07:00:00", "2004-04-04 08:00:00", 
"2004-10-31 07:00:00", "2005-04-03 08:00:00", "2005-10-30 07:00:00", 
"2006-04-02 08:00:00", "2006-10-29 07:00:00", "2007-04-01 08:00:00", 
"2007-10-28 07:00:00", "2008-04-06 08:00:00", "2008-10-26 07:00:00", 
"2009-04-05 08:00:00", "2009-10-25 07:00:00", "2010-04-04 08:00:00", 
"2010-10-31 07:00:00", "2011-04-03 08:00:00", "2011-10-30 07:00:00", 
"2012-04-01 08:00:00", "2012-10-28 07:00:00", "2013-04-07 08:00:00", 
"2013-10-27 07:00:00", "2014-04-06 08:00:00", "2014-10-26 07:00:00", 
"2015-04-05 08:00:00", "2015-10-25 07:00:00", "2016-04-03 08:00:00", 
"2016-10-30 07:00:00", "2017-04-02 08:00:00", "2017-10-29 07:00:00", 
"2018-04-01 08:00:00", "2018-10-28 07:00:00", "2019-04-07 08:00:00", 
"2019-10-27 07:00:00", "2020-04-05 08:00:00", "2020-10-25 07:00:00", 
"2021-04-04 08:00:00", "2021-10-31 07:00:00", "2022-04-03 08:00:00", 
"2022-10-30 07:00:00", "2023-04-02 08:00:00", "2023-10-29 07:00:00", 
"2024-04-07 08:00:00", "2024-10-27 07:00:00", "2025-04-06 08:00:00", 
"2025-10-26 07:00:00", "2026-04-05 08:00:00", "2026-10-25 07:00:00", 
"2027-04-04 08:00:00", "2027-10-31 07:00:00", "2028-04-02 08:00:00", 
"2028-10-29 07:00:00", "2029-04-01 08:00:00", "2029-10-28 07:00:00", 
"2030-04-07 08:00:00", "2030-10-27 07:00:00"), class = "factor"), 
offSet = c(-18000, -21600, -18000, -21600, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -21600, -18000, -18000, -21600, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600)), .Names = c("Chicago", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128", "129", "130", "131", "132", "133", "134", "135", "136", 
"137", "138", "139", "140", "141", "142", "143", "144", "145", 
"146", "147", "148", "149", "150", "151", "152", "153", "154", 
"155", "156", "157", "158", "159", "160", "161", "162", "163", 
"164", "165", "166", "167", "168", "169", "170", "171", "172", 
"173", "174", "175", "176", "177", "178", "179", "180", "181", 
"182", "183", "184", "185", "186", "187", "188", "189", "190", 
"191", "192", "193", "194", "195", "196", "197", "198", "199", 
"200", "201", "202", "203", "204", "205", "206", "207", "208", 
"209", "210", "211", "212", "213", "214", "215", "216", "217", 
"218", "219", "220", "221", "222", "223", "224", "225"), 
class = "data.frame") }


"Denver" <- function() {
structure(list(Denver = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 
141, 142, 143, 144, 145, 146, 147)), .Label = c("1918-03-31 09:00:00", 
"1918-10-27 08:00:00", "1919-03-30 09:00:00", "1919-10-26 08:00:00", 
"1920-01-01 07:00:00", "1920-03-28 09:00:00", "1920-10-31 08:00:00", 
"1921-03-27 09:00:00", "1921-05-22 08:00:00", "1942-01-01 07:00:00", 
"1942-02-09 09:00:00", "1945-08-14 23:00:00", "1945-09-30 08:00:00", 
"1946-01-01 07:00:00", "1965-04-25 09:00:00", "1965-10-31 08:00:00", 
"1966-04-24 09:00:00", "1966-10-30 08:00:00", "1967-01-01 07:00:00", 
"1967-04-30 09:00:00", "1967-10-29 08:00:00", "1968-04-28 09:00:00", 
"1968-10-27 08:00:00", "1969-04-27 09:00:00", "1969-10-26 08:00:00", 
"1970-04-26 09:00:00", "1970-10-25 08:00:00", "1971-04-25 09:00:00", 
"1971-10-31 08:00:00", "1972-04-30 09:00:00", "1972-10-29 08:00:00", 
"1973-04-29 09:00:00", "1973-10-28 08:00:00", "1974-01-06 09:00:00", 
"1974-10-27 08:00:00", "1975-02-23 09:00:00", "1975-10-26 08:00:00", 
"1976-04-25 09:00:00", "1976-10-31 08:00:00", "1977-04-24 09:00:00", 
"1977-10-30 08:00:00", "1978-04-30 09:00:00", "1978-10-29 08:00:00", 
"1979-04-29 09:00:00", "1979-10-28 08:00:00", "1980-04-27 09:00:00", 
"1980-10-26 08:00:00", "1981-04-26 09:00:00", "1981-10-25 08:00:00", 
"1982-04-25 09:00:00", "1982-10-31 08:00:00", "1983-04-24 09:00:00", 
"1983-10-30 08:00:00", "1984-04-29 09:00:00", "1984-10-28 08:00:00", 
"1985-04-28 09:00:00", "1985-10-27 08:00:00", "1986-04-27 09:00:00", 
"1986-10-26 08:00:00", "1987-04-05 09:00:00", "1987-10-25 08:00:00", 
"1988-04-03 09:00:00", "1988-10-30 08:00:00", "1989-04-02 09:00:00", 
"1989-10-29 08:00:00", "1990-04-01 09:00:00", "1990-10-28 08:00:00", 
"1991-04-07 09:00:00", "1991-10-27 08:00:00", "1992-04-05 09:00:00", 
"1992-10-25 08:00:00", "1993-04-04 09:00:00", "1993-10-31 08:00:00", 
"1994-04-03 09:00:00", "1994-10-30 08:00:00", "1995-04-02 09:00:00", 
"1995-10-29 08:00:00", "1996-04-07 09:00:00", "1996-10-27 08:00:00", 
"1997-04-06 09:00:00", "1997-10-26 08:00:00", "1998-04-05 09:00:00", 
"1998-10-25 08:00:00", "1999-04-04 09:00:00", "1999-10-31 08:00:00", 
"2000-04-02 09:00:00", "2000-10-29 08:00:00", "2001-04-01 09:00:00", 
"2001-10-28 08:00:00", "2002-04-07 09:00:00", "2002-10-27 08:00:00", 
"2003-04-06 09:00:00", "2003-10-26 08:00:00", "2004-04-04 09:00:00", 
"2004-10-31 08:00:00", "2005-04-03 09:00:00", "2005-10-30 08:00:00", 
"2006-04-02 09:00:00", "2006-10-29 08:00:00", "2007-04-01 09:00:00", 
"2007-10-28 08:00:00", "2008-04-06 09:00:00", "2008-10-26 08:00:00", 
"2009-04-05 09:00:00", "2009-10-25 08:00:00", "2010-04-04 09:00:00", 
"2010-10-31 08:00:00", "2011-04-03 09:00:00", "2011-10-30 08:00:00", 
"2012-04-01 09:00:00", "2012-10-28 08:00:00", "2013-04-07 09:00:00", 
"2013-10-27 08:00:00", "2014-04-06 09:00:00", "2014-10-26 08:00:00", 
"2015-04-05 09:00:00", "2015-10-25 08:00:00", "2016-04-03 09:00:00", 
"2016-10-30 08:00:00", "2017-04-02 09:00:00", "2017-10-29 08:00:00", 
"2018-04-01 09:00:00", "2018-10-28 08:00:00", "2019-04-07 09:00:00", 
"2019-10-27 08:00:00", "2020-04-05 09:00:00", "2020-10-25 08:00:00", 
"2021-04-04 09:00:00", "2021-10-31 08:00:00", "2022-04-03 09:00:00", 
"2022-10-30 08:00:00", "2023-04-02 09:00:00", "2023-10-29 08:00:00", 
"2024-04-07 09:00:00", "2024-10-27 08:00:00", "2025-04-06 09:00:00", 
"2025-10-26 08:00:00", "2026-04-05 09:00:00", "2026-10-25 08:00:00", 
"2027-04-04 09:00:00", "2027-10-31 08:00:00", "2028-04-02 09:00:00", 
"2028-10-29 08:00:00", "2029-04-01 09:00:00", "2029-10-28 08:00:00", 
"2030-04-07 09:00:00", "2030-10-27 08:00:00"), class = "factor"), 
offSet = c(-21600, -25200, -21600, -25200, -25200, -21600, 
-25200, -21600, -25200, -25200, -21600, -21600, -25200, -25200, 
-21600, -25200, -21600, -25200, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200, -21600, -25200, -21600, 
-25200, -21600, -25200, -21600, -25200)), .Names = c("Denver", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147"), class = "data.frame") }


"Detroit" <- function() {
structure(list(Detroit = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 
128)), .Label = c("1915-05-15 08:00:00", "1942-01-01 05:00:00", 
"1942-02-09 07:00:00", "1945-08-14 23:00:00", "1945-09-30 06:00:00", 
"1946-01-01 05:00:00", "1948-04-25 07:00:00", "1948-09-26 06:00:00", 
"1967-06-14 07:00:00", "1967-10-29 06:00:00", "1973-01-01 05:00:00", 
"1973-04-29 07:00:00", "1973-10-28 06:00:00", "1974-01-06 07:00:00", 
"1974-10-27 06:00:00", "1975-01-01 05:00:00", "1975-04-27 07:00:00", 
"1975-10-26 07:00:00", "1976-04-25 07:00:00", "1976-10-31 06:00:00", 
"1977-04-24 07:00:00", "1977-10-30 06:00:00", "1978-04-30 07:00:00", 
"1978-10-29 06:00:00", "1979-04-29 07:00:00", "1979-10-28 06:00:00", 
"1980-04-27 07:00:00", "1980-10-26 06:00:00", "1981-04-26 07:00:00", 
"1981-10-25 06:00:00", "1982-04-25 07:00:00", "1982-10-31 06:00:00", 
"1983-04-24 07:00:00", "1983-10-30 06:00:00", "1984-04-29 07:00:00", 
"1984-10-28 06:00:00", "1985-04-28 07:00:00", "1985-10-27 06:00:00", 
"1986-04-27 07:00:00", "1986-10-26 06:00:00", "1987-04-05 07:00:00", 
"1987-10-25 06:00:00", "1988-04-03 07:00:00", "1988-10-30 06:00:00", 
"1989-04-02 07:00:00", "1989-10-29 06:00:00", "1990-04-01 07:00:00", 
"1990-10-28 06:00:00", "1991-04-07 07:00:00", "1991-10-27 06:00:00", 
"1992-04-05 07:00:00", "1992-10-25 06:00:00", "1993-04-04 07:00:00", 
"1993-10-31 06:00:00", "1994-04-03 07:00:00", "1994-10-30 06:00:00", 
"1995-04-02 07:00:00", "1995-10-29 06:00:00", "1996-04-07 07:00:00", 
"1996-10-27 06:00:00", "1997-04-06 07:00:00", "1997-10-26 06:00:00", 
"1998-04-05 07:00:00", "1998-10-25 06:00:00", "1999-04-04 07:00:00", 
"1999-10-31 06:00:00", "2000-04-02 07:00:00", "2000-10-29 06:00:00", 
"2001-04-01 07:00:00", "2001-10-28 06:00:00", "2002-04-07 07:00:00", 
"2002-10-27 06:00:00", "2003-04-06 07:00:00", "2003-10-26 06:00:00", 
"2004-04-04 07:00:00", "2004-10-31 06:00:00", "2005-04-03 07:00:00", 
"2005-10-30 06:00:00", "2006-04-02 07:00:00", "2006-10-29 06:00:00", 
"2007-04-01 07:00:00", "2007-10-28 06:00:00", "2008-04-06 07:00:00", 
"2008-10-26 06:00:00", "2009-04-05 07:00:00", "2009-10-25 06:00:00", 
"2010-04-04 07:00:00", "2010-10-31 06:00:00", "2011-04-03 07:00:00", 
"2011-10-30 06:00:00", "2012-04-01 07:00:00", "2012-10-28 06:00:00", 
"2013-04-07 07:00:00", "2013-10-27 06:00:00", "2014-04-06 07:00:00", 
"2014-10-26 06:00:00", "2015-04-05 07:00:00", "2015-10-25 06:00:00", 
"2016-04-03 07:00:00", "2016-10-30 06:00:00", "2017-04-02 07:00:00", 
"2017-10-29 06:00:00", "2018-04-01 07:00:00", "2018-10-28 06:00:00", 
"2019-04-07 07:00:00", "2019-10-27 06:00:00", "2020-04-05 07:00:00", 
"2020-10-25 06:00:00", "2021-04-04 07:00:00", "2021-10-31 06:00:00", 
"2022-04-03 07:00:00", "2022-10-30 06:00:00", "2023-04-02 07:00:00", 
"2023-10-29 06:00:00", "2024-04-07 07:00:00", "2024-10-27 06:00:00", 
"2025-04-06 07:00:00", "2025-10-26 06:00:00", "2026-04-05 07:00:00", 
"2026-10-25 06:00:00", "2027-04-04 07:00:00", "2027-10-31 06:00:00", 
"2028-04-02 07:00:00", "2028-10-29 06:00:00", "2029-04-01 07:00:00", 
"2029-10-28 06:00:00", "2030-04-07 07:00:00", "2030-10-27 06:00:00"
), class = "factor"), offSet = c(-18000, -18000, -14400, -14400, 
-18000, -18000, -14400, -18000, -14400, -18000, -18000, -14400, 
-18000, -14400, -18000, -18000, -18000, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000)), .Names = c("Detroit", "offSet"
), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", 
"43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", 
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", 
"65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", 
"76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", 
"87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", 
"98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128"), class = "data.frame") }



"Edmonton" <- function() {
structure(list(Edmonton = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138)), 
.Label = c("1918-04-14 09:00:00", 
"1918-10-31 08:00:00", "1919-04-13 09:00:00", "1919-05-27 08:00:00", 
"1920-04-25 09:00:00", "1920-10-31 08:00:00", "1921-04-24 09:00:00", 
"1921-09-25 08:00:00", "1922-04-30 09:00:00", "1922-09-24 08:00:00", 
"1923-04-29 09:00:00", "1923-09-30 08:00:00", "1942-02-09 09:00:00", 
"1945-09-30 08:00:00", "1947-04-27 09:00:00", "1947-09-28 08:00:00", 
"1967-04-30 09:00:00", "1967-10-29 08:00:00", "1969-04-27 09:00:00", 
"1969-10-26 08:00:00", "1972-04-30 09:00:00", "1972-10-29 08:00:00", 
"1973-04-29 09:00:00", "1973-10-28 08:00:00", "1974-04-28 09:00:00", 
"1974-10-27 08:00:00", "1975-04-27 09:00:00", "1975-10-26 08:00:00", 
"1976-04-25 09:00:00", "1976-10-31 08:00:00", "1977-04-24 09:00:00", 
"1977-10-30 08:00:00", "1978-04-30 09:00:00", "1978-10-29 08:00:00", 
"1979-04-29 09:00:00", "1979-10-28 08:00:00", "1980-04-27 09:00:00", 
"1980-10-26 08:00:00", "1981-04-26 09:00:00", "1981-10-25 08:00:00", 
"1982-04-25 09:00:00", "1982-10-31 08:00:00", "1983-04-24 09:00:00", 
"1983-10-30 08:00:00", "1984-04-29 09:00:00", "1984-10-28 08:00:00", 
"1985-04-28 09:00:00", "1985-10-27 08:00:00", "1986-04-27 09:00:00", 
"1986-10-26 08:00:00", "1987-04-05 09:00:00", "1987-10-25 08:00:00", 
"1988-04-03 09:00:00", "1988-10-30 08:00:00", "1989-04-02 09:00:00", 
"1989-10-29 08:00:00", "1990-04-01 09:00:00", "1990-10-28 08:00:00", 
"1991-04-07 09:00:00", "1991-10-27 08:00:00", "1992-04-05 09:00:00", 
"1992-10-25 08:00:00", "1993-04-04 09:00:00", "1993-10-31 08:00:00", 
"1994-04-03 09:00:00", "1994-10-30 08:00:00", "1995-04-02 09:00:00", 
"1995-10-29 08:00:00", "1996-04-07 09:00:00", "1996-10-27 08:00:00", 
"1997-04-06 09:00:00", "1997-10-26 08:00:00", "1998-04-05 09:00:00", 
"1998-10-25 08:00:00", "1999-04-04 09:00:00", "1999-10-31 08:00:00", 
"2000-04-02 09:00:00", "2000-10-29 08:00:00", "2001-04-01 09:00:00", 
"2001-10-28 08:00:00", "2002-04-07 09:00:00", "2002-10-27 08:00:00", 
"2003-04-06 09:00:00", "2003-10-26 08:00:00", "2004-04-04 09:00:00", 
"2004-10-31 08:00:00", "2005-04-03 09:00:00", "2005-10-30 08:00:00", 
"2006-04-02 09:00:00", "2006-10-29 08:00:00", "2007-04-01 09:00:00", 
"2007-10-28 08:00:00", "2008-04-06 09:00:00", "2008-10-26 08:00:00", 
"2009-04-05 09:00:00", "2009-10-25 08:00:00", "2010-04-04 09:00:00", 
"2010-10-31 08:00:00", "2011-04-03 09:00:00", "2011-10-30 08:00:00", 
"2012-04-01 09:00:00", "2012-10-28 08:00:00", "2013-04-07 09:00:00", 
"2013-10-27 08:00:00", "2014-04-06 09:00:00", "2014-10-26 08:00:00", 
"2015-04-05 09:00:00", "2015-10-25 08:00:00", "2016-04-03 09:00:00", 
"2016-10-30 08:00:00", "2017-04-02 09:00:00", "2017-10-29 08:00:00", 
"2018-04-01 09:00:00", "2018-10-28 08:00:00", "2019-04-07 09:00:00", 
"2019-10-27 08:00:00", "2020-04-05 09:00:00", "2020-10-25 08:00:00", 
"2021-04-04 09:00:00", "2021-10-31 08:00:00", "2022-04-03 09:00:00", 
"2022-10-30 08:00:00", "2023-04-02 09:00:00", "2023-10-29 08:00:00", 
"2024-04-07 09:00:00", "2024-10-27 08:00:00", "2025-04-06 09:00:00", 
"2025-10-26 08:00:00", "2026-04-05 09:00:00", "2026-10-25 08:00:00", 
"2027-04-04 09:00:00", "2027-10-31 08:00:00", "2028-04-02 09:00:00", 
"2028-10-29 08:00:00", "2029-04-01 09:00:00", "2029-10-28 08:00:00", 
"2030-04-07 09:00:00", "2030-10-27 08:00:00"), class = "factor"), 
offSet = c(-21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200, -21600, -25200, -21600, -25200, 
-21600, -25200, -21600, -25200)), .Names = c("Edmonton", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138"), class = "data.frame") }


"Indianapolis" <- function() {
structure(list(Indianapolis = structure(as.integer(c(1, 2, 3, 
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 
37, 38, 39)), .Label = c("1918-03-31 08:00:00", "1918-10-27 07:00:00", 
"1919-03-30 08:00:00", "1919-10-26 07:00:00", "1920-01-01 06:00:00", 
"1941-06-22 08:00:00", "1941-09-28 07:00:00", "1942-01-01 06:00:00", 
"1942-02-09 08:00:00", "1945-08-14 23:00:00", "1945-09-30 07:00:00", 
"1946-01-01 06:00:00", "1946-04-28 08:00:00", "1946-09-29 07:00:00", 
"1947-04-27 08:00:00", "1947-09-28 07:00:00", "1948-04-25 08:00:00", 
"1948-09-26 07:00:00", "1949-04-24 08:00:00", "1949-09-25 07:00:00", 
"1950-04-30 08:00:00", "1950-09-24 07:00:00", "1951-04-29 08:00:00", 
"1951-09-30 07:00:00", "1952-04-27 08:00:00", "1952-09-28 07:00:00", 
"1953-04-26 08:00:00", "1953-09-27 07:00:00", "1954-04-25 08:00:00", 
"1954-09-26 07:00:00", "1955-04-24 08:00:00", "1957-09-29 07:00:00", 
"1958-04-27 08:00:00", "1969-01-01 05:00:00", "1969-04-27 07:00:00", 
"1969-10-26 06:00:00", "1970-04-26 07:00:00", "1970-10-25 06:00:00", 
"1971-01-01 05:00:00"), class = "factor"), offSet = c(-18000, 
-21600, -18000, -21600, -21600, -18000, -21600, -21600, -18000, 
-18000, -21600, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-18000, -14400, -18000, -14400, -18000, -18000)), .Names = c("Indianapolis", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39"), class = "data.frame") }


"LosAngeles" <- "Pacific" <- function() {
structure(list(LosAngeles = structure(as.integer(c(1, 2, 3, 
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 
69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 
153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 
166, 167, 168, 169, 170, 171, 172, 173)), .Label = c("1918-03-31 10:00:00", 
"1918-10-27 09:00:00", "1919-03-30 10:00:00", "1919-10-26 09:00:00", 
"1942-02-09 10:00:00", "1945-08-14 23:00:00", "1945-09-30 09:00:00", 
"1946-01-01 08:00:00", "1948-03-14 10:00:00", "1949-01-01 09:00:00", 
"1950-04-30 10:00:00", "1950-09-24 09:00:00", "1951-04-29 10:00:00", 
"1951-09-30 09:00:00", "1952-04-27 10:00:00", "1952-09-28 09:00:00", 
"1953-04-26 10:00:00", "1953-09-27 09:00:00", "1954-04-25 10:00:00", 
"1954-09-26 09:00:00", "1955-04-24 10:00:00", "1955-09-25 09:00:00", 
"1956-04-29 10:00:00", "1956-09-30 09:00:00", "1957-04-28 10:00:00", 
"1957-09-29 09:00:00", "1958-04-27 10:00:00", "1958-09-28 09:00:00", 
"1959-04-26 10:00:00", "1959-09-27 09:00:00", "1960-04-24 10:00:00", 
"1960-09-25 09:00:00", "1961-04-30 10:00:00", "1961-09-24 09:00:00", 
"1962-04-29 10:00:00", "1962-10-28 09:00:00", "1963-04-28 10:00:00", 
"1963-10-27 09:00:00", "1964-04-26 10:00:00", "1964-10-25 09:00:00", 
"1965-04-25 10:00:00", "1965-10-31 09:00:00", "1966-04-24 10:00:00", 
"1966-10-30 09:00:00", "1967-01-01 08:00:00", "1967-04-30 10:00:00", 
"1967-10-29 09:00:00", "1968-04-28 10:00:00", "1968-10-27 09:00:00", 
"1969-04-27 10:00:00", "1969-10-26 09:00:00", "1970-04-26 10:00:00", 
"1970-10-25 09:00:00", "1971-04-25 10:00:00", "1971-10-31 09:00:00", 
"1972-04-30 10:00:00", "1972-10-29 09:00:00", "1973-04-29 10:00:00", 
"1973-10-28 09:00:00", "1974-01-06 10:00:00", "1974-10-27 09:00:00", 
"1975-02-23 10:00:00", "1975-10-26 09:00:00", "1976-04-25 10:00:00", 
"1976-10-31 09:00:00", "1977-04-24 10:00:00", "1977-10-30 09:00:00", 
"1978-04-30 10:00:00", "1978-10-29 09:00:00", "1979-04-29 10:00:00", 
"1979-10-28 09:00:00", "1980-04-27 10:00:00", "1980-10-26 09:00:00", 
"1981-04-26 10:00:00", "1981-10-25 09:00:00", "1982-04-25 10:00:00", 
"1982-10-31 09:00:00", "1983-04-24 10:00:00", "1983-10-30 09:00:00", 
"1984-04-29 10:00:00", "1984-10-28 09:00:00", "1985-04-28 10:00:00", 
"1985-10-27 09:00:00", "1986-04-27 10:00:00", "1986-10-26 09:00:00", 
"1987-04-05 10:00:00", "1987-10-25 09:00:00", "1988-04-03 10:00:00", 
"1988-10-30 09:00:00", "1989-04-02 10:00:00", "1989-10-29 09:00:00", 
"1990-04-01 10:00:00", "1990-10-28 09:00:00", "1991-04-07 10:00:00", 
"1991-10-27 09:00:00", "1992-04-05 10:00:00", "1992-10-25 09:00:00", 
"1993-04-04 10:00:00", "1993-10-31 09:00:00", "1994-04-03 10:00:00", 
"1994-10-30 09:00:00", "1995-04-02 10:00:00", "1995-10-29 09:00:00", 
"1996-04-07 10:00:00", "1996-10-27 09:00:00", "1997-04-06 10:00:00", 
"1997-10-26 09:00:00", "1998-04-05 10:00:00", "1998-10-25 09:00:00", 
"1999-04-04 10:00:00", "1999-10-31 09:00:00", "2000-04-02 10:00:00", 
"2000-10-29 09:00:00", "2001-04-01 10:00:00", "2001-10-28 09:00:00", 
"2002-04-07 10:00:00", "2002-10-27 09:00:00", "2003-04-06 10:00:00", 
"2003-10-26 09:00:00", "2004-04-04 10:00:00", "2004-10-31 09:00:00", 
"2005-04-03 10:00:00", "2005-10-30 09:00:00", "2006-04-02 10:00:00", 
"2006-10-29 09:00:00", "2007-04-01 10:00:00", "2007-10-28 09:00:00", 
"2008-04-06 10:00:00", "2008-10-26 09:00:00", "2009-04-05 10:00:00", 
"2009-10-25 09:00:00", "2010-04-04 10:00:00", "2010-10-31 09:00:00", 
"2011-04-03 10:00:00", "2011-10-30 09:00:00", "2012-04-01 10:00:00", 
"2012-10-28 09:00:00", "2013-04-07 10:00:00", "2013-10-27 09:00:00", 
"2014-04-06 10:00:00", "2014-10-26 09:00:00", "2015-04-05 10:00:00", 
"2015-10-25 09:00:00", "2016-04-03 10:00:00", "2016-10-30 09:00:00", 
"2017-04-02 10:00:00", "2017-10-29 09:00:00", "2018-04-01 10:00:00", 
"2018-10-28 09:00:00", "2019-04-07 10:00:00", "2019-10-27 09:00:00", 
"2020-04-05 10:00:00", "2020-10-25 09:00:00", "2021-04-04 10:00:00", 
"2021-10-31 09:00:00", "2022-04-03 10:00:00", "2022-10-30 09:00:00", 
"2023-04-02 10:00:00", "2023-10-29 09:00:00", "2024-04-07 10:00:00", 
"2024-10-27 09:00:00", "2025-04-06 10:00:00", "2025-10-26 09:00:00", 
"2026-04-05 10:00:00", "2026-10-25 09:00:00", "2027-04-04 10:00:00", 
"2027-10-31 09:00:00", "2028-04-02 10:00:00", "2028-10-29 09:00:00", 
"2029-04-01 10:00:00", "2029-10-28 09:00:00", "2030-04-07 10:00:00", 
"2030-10-27 09:00:00"), class = "factor"), offSet = c(-25200, 
-28800, -25200, -28800, -25200, -25200, -28800, -28800, -25200, 
-28800, -25200, -28800, -25200, -28800, -25200, -28800, -25200, 
-28800, -25200, -28800, -25200, -28800, -25200, -28800, -25200, 
-28800, -25200, -28800, -25200, -28800, -25200, -28800, -25200, 
-28800, -25200, -28800, -25200, -28800, -25200, -28800, -25200, 
-28800, -25200, -28800, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800)), .Names = c("Los_Angeles", "offSet"
), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", 
"43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", 
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", 
"65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", 
"76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", 
"87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", 
"98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150", "151", 
"152", "153", "154", "155", "156", "157", "158", "159", "160", 
"161", "162", "163", "164", "165", "166", "167", "168", "169", 
"170", "171", "172", "173"), class = "data.frame") }


"MexicoCity" <- function() {
structure(list(MexicoCity = structure(as.integer(c(1, 2, 3, 
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 
69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83)), 
.Label = c("1927-06-11 06:00:00", 
"1930-11-15 06:00:00", "1931-05-02 06:00:00", "1931-10-01 06:00:00", 
"1932-04-01 07:00:00", "1939-02-05 06:00:00", "1939-06-25 05:00:00", 
"1940-12-09 06:00:00", "1941-04-01 05:00:00", "1943-12-16 06:00:00", 
"1944-05-01 05:00:00", "1950-02-12 06:00:00", "1950-07-30 05:00:00", 
"1996-04-07 08:00:00", "1996-10-27 07:00:00", "1997-04-06 08:00:00", 
"1997-10-26 07:00:00", "1998-04-05 08:00:00", "1998-10-25 07:00:00", 
"1999-04-04 08:00:00", "1999-10-31 07:00:00", "2000-04-02 08:00:00", 
"2000-10-29 07:00:00", "2001-05-06 08:00:00", "2001-09-30 07:00:00", 
"2002-05-05 08:00:00", "2002-09-29 07:00:00", "2003-05-04 08:00:00", 
"2003-09-28 07:00:00", "2004-05-02 08:00:00", "2004-09-26 07:00:00", 
"2005-05-01 08:00:00", "2005-09-25 07:00:00", "2006-05-07 08:00:00", 
"2006-09-24 07:00:00", "2007-05-06 08:00:00", "2007-09-30 07:00:00", 
"2008-05-04 08:00:00", "2008-09-28 07:00:00", "2009-05-03 08:00:00", 
"2009-09-27 07:00:00", "2010-05-02 08:00:00", "2010-09-26 07:00:00", 
"2011-05-01 08:00:00", "2011-09-25 07:00:00", "2012-05-06 08:00:00", 
"2012-09-30 07:00:00", "2013-05-05 08:00:00", "2013-09-29 07:00:00", 
"2014-05-04 08:00:00", "2014-09-28 07:00:00", "2015-05-03 08:00:00", 
"2015-09-27 07:00:00", "2016-05-01 08:00:00", "2016-09-25 07:00:00", 
"2017-05-07 08:00:00", "2017-09-24 07:00:00", "2018-05-06 08:00:00", 
"2018-09-30 07:00:00", "2019-05-05 08:00:00", "2019-09-29 07:00:00", 
"2020-05-03 08:00:00", "2020-09-27 07:00:00", "2021-05-02 08:00:00", 
"2021-09-26 07:00:00", "2022-05-01 08:00:00", "2022-09-25 07:00:00", 
"2023-05-07 08:00:00", "2023-09-24 07:00:00", "2024-05-05 08:00:00", 
"2024-09-29 07:00:00", "2025-05-04 08:00:00", "2025-09-28 07:00:00", 
"2026-05-03 08:00:00", "2026-09-27 07:00:00", "2027-05-02 08:00:00", 
"2027-09-26 07:00:00", "2028-05-07 08:00:00", "2028-09-24 07:00:00", 
"2029-05-06 08:00:00", "2029-09-30 07:00:00", "2030-05-05 08:00:00", 
"2030-09-29 07:00:00"), class = "factor"), offSet = c(-21600, 
-25200, -21600, -25200, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600, -18000, -21600, -18000, -21600, -18000, -21600, 
-18000, -21600)), .Names = c("Mexico_City", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83"), class = "data.frame") }


"Montreal" <- function() {
structure(list(Montreal = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 
153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 
166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 
179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 
205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216)), 
.Label = c("1917-03-25 07:00:00", 
"1917-04-24 04:00:00", "1918-04-14 07:00:00", "1918-10-31 06:00:00", 
"1919-03-31 07:30:00", "1919-10-25 06:30:00", "1920-05-02 07:30:00", 
"1920-10-03 06:30:00", "1921-05-01 07:00:00", "1921-10-02 06:30:00", 
"1922-04-30 07:00:00", "1922-10-01 06:30:00", "1924-05-17 07:00:00", 
"1924-09-28 06:30:00", "1925-05-03 07:00:00", "1925-09-27 06:30:00", 
"1926-05-02 07:00:00", "1926-09-26 06:30:00", "1927-05-01 05:00:00", 
"1927-09-25 04:00:00", "1928-04-29 05:00:00", "1928-09-30 04:00:00", 
"1929-04-28 05:00:00", "1929-09-29 04:00:00", "1930-04-27 05:00:00", 
"1930-09-28 04:00:00", "1931-04-26 05:00:00", "1931-09-27 04:00:00", 
"1932-05-01 05:00:00", "1932-09-25 04:00:00", "1933-04-30 05:00:00", 
"1933-10-01 04:00:00", "1934-04-29 05:00:00", "1934-09-30 04:00:00", 
"1935-04-28 05:00:00", "1935-09-29 04:00:00", "1936-04-26 05:00:00", 
"1936-09-27 04:00:00", "1937-04-25 05:00:00", "1937-09-26 04:00:00", 
"1938-04-24 05:00:00", "1938-09-25 04:00:00", "1939-04-30 05:00:00", 
"1939-09-24 04:00:00", "1940-04-28 05:00:00", "1945-09-30 06:00:00", 
"1946-04-28 07:00:00", "1946-09-29 06:00:00", "1947-04-27 07:00:00", 
"1947-09-28 06:00:00", "1948-04-25 07:00:00", "1948-09-26 06:00:00", 
"1949-04-24 07:00:00", "1949-10-30 06:00:00", "1950-04-30 07:00:00", 
"1950-10-29 06:00:00", "1951-04-29 07:00:00", "1951-09-30 06:00:00", 
"1952-04-27 07:00:00", "1952-09-28 06:00:00", "1953-04-26 07:00:00", 
"1953-09-27 06:00:00", "1954-04-25 07:00:00", "1954-09-26 06:00:00", 
"1955-04-24 07:00:00", "1955-09-25 06:00:00", "1956-04-29 07:00:00", 
"1956-09-30 06:00:00", "1957-04-28 07:00:00", "1957-10-27 06:00:00", 
"1958-04-27 07:00:00", "1958-10-26 06:00:00", "1959-04-26 07:00:00", 
"1959-10-25 06:00:00", "1960-04-24 07:00:00", "1960-10-30 06:00:00", 
"1961-04-30 07:00:00", "1961-10-29 06:00:00", "1962-04-29 07:00:00", 
"1962-10-28 06:00:00", "1963-04-28 07:00:00", "1963-10-27 06:00:00", 
"1964-04-26 07:00:00", "1964-10-25 06:00:00", "1965-04-25 07:00:00", 
"1965-10-31 06:00:00", "1966-04-24 07:00:00", "1966-10-30 06:00:00", 
"1967-04-30 07:00:00", "1967-10-29 06:00:00", "1968-04-28 07:00:00", 
"1968-10-27 06:00:00", "1969-04-27 07:00:00", "1969-10-26 06:00:00", 
"1970-04-26 07:00:00", "1970-10-25 06:00:00", "1971-04-25 07:00:00", 
"1971-10-31 06:00:00", "1972-04-30 07:00:00", "1972-10-29 06:00:00", 
"1973-04-29 07:00:00", "1973-10-28 06:00:00", "1974-04-28 07:00:00", 
"1974-10-27 06:00:00", "1975-04-27 07:00:00", "1975-10-26 06:00:00", 
"1976-04-25 07:00:00", "1976-10-31 06:00:00", "1977-04-24 07:00:00", 
"1977-10-30 06:00:00", "1978-04-30 07:00:00", "1978-10-29 06:00:00", 
"1979-04-29 07:00:00", "1979-10-28 06:00:00", "1980-04-27 07:00:00", 
"1980-10-26 06:00:00", "1981-04-26 07:00:00", "1981-10-25 06:00:00", 
"1982-04-25 07:00:00", "1982-10-31 06:00:00", "1983-04-24 07:00:00", 
"1983-10-30 06:00:00", "1984-04-29 07:00:00", "1984-10-28 06:00:00", 
"1985-04-28 07:00:00", "1985-10-27 06:00:00", "1986-04-27 07:00:00", 
"1986-10-26 06:00:00", "1987-04-05 07:00:00", "1987-10-25 06:00:00", 
"1988-04-03 07:00:00", "1988-10-30 06:00:00", "1989-04-02 07:00:00", 
"1989-10-29 06:00:00", "1990-04-01 07:00:00", "1990-10-28 06:00:00", 
"1991-04-07 07:00:00", "1991-10-27 06:00:00", "1992-04-05 07:00:00", 
"1992-10-25 06:00:00", "1993-04-04 07:00:00", "1993-10-31 06:00:00", 
"1994-04-03 07:00:00", "1994-10-30 06:00:00", "1995-04-02 07:00:00", 
"1995-10-29 06:00:00", "1996-04-07 07:00:00", "1996-10-27 06:00:00", 
"1997-04-06 07:00:00", "1997-10-26 06:00:00", "1998-04-05 07:00:00", 
"1998-10-25 06:00:00", "1999-04-04 07:00:00", "1999-10-31 06:00:00", 
"2000-04-02 07:00:00", "2000-10-29 06:00:00", "2001-04-01 07:00:00", 
"2001-10-28 06:00:00", "2002-04-07 07:00:00", "2002-10-27 06:00:00", 
"2003-04-06 07:00:00", "2003-10-26 06:00:00", "2004-04-04 07:00:00", 
"2004-10-31 06:00:00", "2005-04-03 07:00:00", "2005-10-30 06:00:00", 
"2006-04-02 07:00:00", "2006-10-29 06:00:00", "2007-04-01 07:00:00", 
"2007-10-28 06:00:00", "2008-04-06 07:00:00", "2008-10-26 06:00:00", 
"2009-04-05 07:00:00", "2009-10-25 06:00:00", "2010-04-04 07:00:00", 
"2010-10-31 06:00:00", "2011-04-03 07:00:00", "2011-10-30 06:00:00", 
"2012-04-01 07:00:00", "2012-10-28 06:00:00", "2013-04-07 07:00:00", 
"2013-10-27 06:00:00", "2014-04-06 07:00:00", "2014-10-26 06:00:00", 
"2015-04-05 07:00:00", "2015-10-25 06:00:00", "2016-04-03 07:00:00", 
"2016-10-30 06:00:00", "2017-04-02 07:00:00", "2017-10-29 06:00:00", 
"2018-04-01 07:00:00", "2018-10-28 06:00:00", "2019-04-07 07:00:00", 
"2019-10-27 06:00:00", "2020-04-05 07:00:00", "2020-10-25 06:00:00", 
"2021-04-04 07:00:00", "2021-10-31 06:00:00", "2022-04-03 07:00:00", 
"2022-10-30 06:00:00", "2023-04-02 07:00:00", "2023-10-29 06:00:00", 
"2024-04-07 07:00:00", "2024-10-27 06:00:00", "2025-04-06 07:00:00", 
"2025-10-26 06:00:00", "2026-04-05 07:00:00", "2026-10-25 06:00:00", 
"2027-04-04 07:00:00", "2027-10-31 06:00:00", "2028-04-02 07:00:00", 
"2028-10-29 06:00:00", "2029-04-01 07:00:00", "2029-10-28 06:00:00", 
"2030-04-07 07:00:00", "2030-10-27 06:00:00"), class = "factor"), 
offSet = c(-14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000)), .Names = c("Montreal", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128", "129", "130", "131", "132", "133", "134", "135", "136", 
"137", "138", "139", "140", "141", "142", "143", "144", "145", 
"146", "147", "148", "149", "150", "151", "152", "153", "154", 
"155", "156", "157", "158", "159", "160", "161", "162", "163", 
"164", "165", "166", "167", "168", "169", "170", "171", "172", 
"173", "174", "175", "176", "177", "178", "179", "180", "181", 
"182", "183", "184", "185", "186", "187", "188", "189", "190", 
"191", "192", "193", "194", "195", "196", "197", "198", "199", 
"200", "201", "202", "203", "204", "205", "206", "207", "208", 
"209", "210", "211", "212", "213", "214", "215", "216"), class = "data.frame") }


"Nassau" <- function() {
structure(list(Nassau = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 
128, 129, 130, 131, 132, 133, 134)), .Label = c("1964-04-26 07:00:00", 
"1964-10-25 06:00:00", "1965-04-25 07:00:00", "1965-10-31 06:00:00", 
"1966-04-24 07:00:00", "1966-10-30 06:00:00", "1967-04-30 07:00:00", 
"1967-10-29 06:00:00", "1968-04-28 07:00:00", "1968-10-27 06:00:00", 
"1969-04-27 07:00:00", "1969-10-26 06:00:00", "1970-04-26 07:00:00", 
"1970-10-25 06:00:00", "1971-04-25 07:00:00", "1971-10-31 06:00:00", 
"1972-04-30 07:00:00", "1972-10-29 06:00:00", "1973-04-29 07:00:00", 
"1973-10-28 06:00:00", "1974-04-28 07:00:00", "1974-10-27 06:00:00", 
"1975-04-27 07:00:00", "1975-10-26 06:00:00", "1976-04-25 07:00:00", 
"1976-10-31 06:00:00", "1977-04-24 07:00:00", "1977-10-30 06:00:00", 
"1978-04-30 07:00:00", "1978-10-29 06:00:00", "1979-04-29 07:00:00", 
"1979-10-28 06:00:00", "1980-04-27 07:00:00", "1980-10-26 06:00:00", 
"1981-04-26 07:00:00", "1981-10-25 06:00:00", "1982-04-25 07:00:00", 
"1982-10-31 06:00:00", "1983-04-24 07:00:00", "1983-10-30 06:00:00", 
"1984-04-29 07:00:00", "1984-10-28 06:00:00", "1985-04-28 07:00:00", 
"1985-10-27 06:00:00", "1986-04-27 07:00:00", "1986-10-26 06:00:00", 
"1987-04-05 07:00:00", "1987-10-25 06:00:00", "1988-04-03 07:00:00", 
"1988-10-30 06:00:00", "1989-04-02 07:00:00", "1989-10-29 06:00:00", 
"1990-04-01 07:00:00", "1990-10-28 06:00:00", "1991-04-07 07:00:00", 
"1991-10-27 06:00:00", "1992-04-05 07:00:00", "1992-10-25 06:00:00", 
"1993-04-04 07:00:00", "1993-10-31 06:00:00", "1994-04-03 07:00:00", 
"1994-10-30 06:00:00", "1995-04-02 07:00:00", "1995-10-29 06:00:00", 
"1996-04-07 07:00:00", "1996-10-27 06:00:00", "1997-04-06 07:00:00", 
"1997-10-26 06:00:00", "1998-04-05 07:00:00", "1998-10-25 06:00:00", 
"1999-04-04 07:00:00", "1999-10-31 06:00:00", "2000-04-02 07:00:00", 
"2000-10-29 06:00:00", "2001-04-01 07:00:00", "2001-10-28 06:00:00", 
"2002-04-07 07:00:00", "2002-10-27 06:00:00", "2003-04-06 07:00:00", 
"2003-10-26 06:00:00", "2004-04-04 07:00:00", "2004-10-31 06:00:00", 
"2005-04-03 07:00:00", "2005-10-30 06:00:00", "2006-04-02 07:00:00", 
"2006-10-29 06:00:00", "2007-04-01 07:00:00", "2007-10-28 06:00:00", 
"2008-04-06 07:00:00", "2008-10-26 06:00:00", "2009-04-05 07:00:00", 
"2009-10-25 06:00:00", "2010-04-04 07:00:00", "2010-10-31 06:00:00", 
"2011-04-03 07:00:00", "2011-10-30 06:00:00", "2012-04-01 07:00:00", 
"2012-10-28 06:00:00", "2013-04-07 07:00:00", "2013-10-27 06:00:00", 
"2014-04-06 07:00:00", "2014-10-26 06:00:00", "2015-04-05 07:00:00", 
"2015-10-25 06:00:00", "2016-04-03 07:00:00", "2016-10-30 06:00:00", 
"2017-04-02 07:00:00", "2017-10-29 06:00:00", "2018-04-01 07:00:00", 
"2018-10-28 06:00:00", "2019-04-07 07:00:00", "2019-10-27 06:00:00", 
"2020-04-05 07:00:00", "2020-10-25 06:00:00", "2021-04-04 07:00:00", 
"2021-10-31 06:00:00", "2022-04-03 07:00:00", "2022-10-30 06:00:00", 
"2023-04-02 07:00:00", "2023-10-29 06:00:00", "2024-04-07 07:00:00", 
"2024-10-27 06:00:00", "2025-04-06 07:00:00", "2025-10-26 06:00:00", 
"2026-04-05 07:00:00", "2026-10-25 06:00:00", "2027-04-04 07:00:00", 
"2027-10-31 06:00:00", "2028-04-02 07:00:00", "2028-10-29 06:00:00", 
"2029-04-01 07:00:00", "2029-10-28 06:00:00", "2030-04-07 07:00:00", 
"2030-10-27 06:00:00"), class = "factor"), offSet = c(-14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000)), .Names = c("Nassau", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134"), class = "data.frame") }


"NewYork" <- "Eastern" <- function() {
structure(list(NewYork = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 
153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 
166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 
179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 
205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 
218, 219, 220, 221, 222, 223, 224, 225)), .Label = c("1918-03-31 07:00:00", 
"1918-10-27 06:00:00", "1919-03-30 07:00:00", "1919-10-26 06:00:00", 
"1920-01-01 05:00:00", "1920-03-28 07:00:00", "1920-10-31 06:00:00", 
"1921-04-24 07:00:00", "1921-09-25 06:00:00", "1922-04-30 07:00:00", 
"1922-09-24 06:00:00", "1923-04-29 07:00:00", "1923-09-30 06:00:00", 
"1924-04-27 07:00:00", "1924-09-28 06:00:00", "1925-04-26 07:00:00", 
"1925-09-27 06:00:00", "1926-04-25 07:00:00", "1926-09-26 06:00:00", 
"1927-04-24 07:00:00", "1927-09-25 06:00:00", "1928-04-29 07:00:00", 
"1928-09-30 06:00:00", "1929-04-28 07:00:00", "1929-09-29 06:00:00", 
"1930-04-27 07:00:00", "1930-09-28 06:00:00", "1931-04-26 07:00:00", 
"1931-09-27 06:00:00", "1932-04-24 07:00:00", "1932-09-25 06:00:00", 
"1933-04-30 07:00:00", "1933-09-24 06:00:00", "1934-04-29 07:00:00", 
"1934-09-30 06:00:00", "1935-04-28 07:00:00", "1935-09-29 06:00:00", 
"1936-04-26 07:00:00", "1936-09-27 06:00:00", "1937-04-25 07:00:00", 
"1937-09-26 06:00:00", "1938-04-24 07:00:00", "1938-09-25 06:00:00", 
"1939-04-30 07:00:00", "1939-09-24 06:00:00", "1940-04-28 07:00:00", 
"1940-09-29 06:00:00", "1941-04-27 07:00:00", "1941-09-28 06:00:00", 
"1942-01-01 05:00:00", "1942-02-09 07:00:00", "1945-08-14 23:00:00", 
"1945-09-30 06:00:00", "1946-01-01 05:00:00", "1946-04-28 07:00:00", 
"1946-09-29 06:00:00", "1947-04-27 07:00:00", "1947-09-28 06:00:00", 
"1948-04-25 07:00:00", "1948-09-26 06:00:00", "1949-04-24 07:00:00", 
"1949-09-25 06:00:00", "1950-04-30 07:00:00", "1950-09-24 06:00:00", 
"1951-04-29 07:00:00", "1951-09-30 06:00:00", "1952-04-27 07:00:00", 
"1952-09-28 06:00:00", "1953-04-26 07:00:00", "1953-09-27 06:00:00", 
"1954-04-25 07:00:00", "1954-09-26 06:00:00", "1955-04-24 07:00:00", 
"1955-10-30 06:00:00", "1956-04-29 07:00:00", "1956-10-28 06:00:00", 
"1957-04-28 07:00:00", "1957-10-27 06:00:00", "1958-04-27 07:00:00", 
"1958-10-26 06:00:00", "1959-04-26 07:00:00", "1959-10-25 06:00:00", 
"1960-04-24 07:00:00", "1960-10-30 06:00:00", "1961-04-30 07:00:00", 
"1961-10-29 06:00:00", "1962-04-29 07:00:00", "1962-10-28 06:00:00", 
"1963-04-28 07:00:00", "1963-10-27 06:00:00", "1964-04-26 07:00:00", 
"1964-10-25 06:00:00", "1965-04-25 07:00:00", "1965-10-31 06:00:00", 
"1966-04-24 07:00:00", "1966-10-30 06:00:00", "1967-01-01 05:00:00", 
"1967-04-30 07:00:00", "1967-10-29 06:00:00", "1968-04-28 07:00:00", 
"1968-10-27 06:00:00", "1969-04-27 07:00:00", "1969-10-26 06:00:00", 
"1970-04-26 07:00:00", "1970-10-25 06:00:00", "1971-04-25 07:00:00", 
"1971-10-31 06:00:00", "1972-04-30 07:00:00", "1972-10-29 06:00:00", 
"1973-04-29 07:00:00", "1973-10-28 06:00:00", "1974-01-06 07:00:00", 
"1974-10-27 06:00:00", "1975-02-23 07:00:00", "1975-10-26 06:00:00", 
"1976-04-25 07:00:00", "1976-10-31 06:00:00", "1977-04-24 07:00:00", 
"1977-10-30 06:00:00", "1978-04-30 07:00:00", "1978-10-29 06:00:00", 
"1979-04-29 07:00:00", "1979-10-28 06:00:00", "1980-04-27 07:00:00", 
"1980-10-26 06:00:00", "1981-04-26 07:00:00", "1981-10-25 06:00:00", 
"1982-04-25 07:00:00", "1982-10-31 06:00:00", "1983-04-24 07:00:00", 
"1983-10-30 06:00:00", "1984-04-29 07:00:00", "1984-10-28 06:00:00", 
"1985-04-28 07:00:00", "1985-10-27 06:00:00", "1986-04-27 07:00:00", 
"1986-10-26 06:00:00", "1987-04-05 07:00:00", "1987-10-25 06:00:00", 
"1988-04-03 07:00:00", "1988-10-30 06:00:00", "1989-04-02 07:00:00", 
"1989-10-29 06:00:00", "1990-04-01 07:00:00", "1990-10-28 06:00:00", 
"1991-04-07 07:00:00", "1991-10-27 06:00:00", "1992-04-05 07:00:00", 
"1992-10-25 06:00:00", "1993-04-04 07:00:00", "1993-10-31 06:00:00", 
"1994-04-03 07:00:00", "1994-10-30 06:00:00", "1995-04-02 07:00:00", 
"1995-10-29 06:00:00", "1996-04-07 07:00:00", "1996-10-27 06:00:00", 
"1997-04-06 07:00:00", "1997-10-26 06:00:00", "1998-04-05 07:00:00", 
"1998-10-25 06:00:00", "1999-04-04 07:00:00", "1999-10-31 06:00:00", 
"2000-04-02 07:00:00", "2000-10-29 06:00:00", "2001-04-01 07:00:00", 
"2001-10-28 06:00:00", "2002-04-07 07:00:00", "2002-10-27 06:00:00", 
"2003-04-06 07:00:00", "2003-10-26 06:00:00", "2004-04-04 07:00:00", 
"2004-10-31 06:00:00", "2005-04-03 07:00:00", "2005-10-30 06:00:00", 
"2006-04-02 07:00:00", "2006-10-29 06:00:00", "2007-04-01 07:00:00", 
"2007-10-28 06:00:00", "2008-04-06 07:00:00", "2008-10-26 06:00:00", 
"2009-04-05 07:00:00", "2009-10-25 06:00:00", "2010-04-04 07:00:00", 
"2010-10-31 06:00:00", "2011-04-03 07:00:00", "2011-10-30 06:00:00", 
"2012-04-01 07:00:00", "2012-10-28 06:00:00", "2013-04-07 07:00:00", 
"2013-10-27 06:00:00", "2014-04-06 07:00:00", "2014-10-26 06:00:00", 
"2015-04-05 07:00:00", "2015-10-25 06:00:00", "2016-04-03 07:00:00", 
"2016-10-30 06:00:00", "2017-04-02 07:00:00", "2017-10-29 06:00:00", 
"2018-04-01 07:00:00", "2018-10-28 06:00:00", "2019-04-07 07:00:00", 
"2019-10-27 06:00:00", "2020-04-05 07:00:00", "2020-10-25 06:00:00", 
"2021-04-04 07:00:00", "2021-10-31 06:00:00", "2022-04-03 07:00:00", 
"2022-10-30 06:00:00", "2023-04-02 07:00:00", "2023-10-29 06:00:00", 
"2024-04-07 07:00:00", "2024-10-27 06:00:00", "2025-04-06 07:00:00", 
"2025-10-26 06:00:00", "2026-04-05 07:00:00", "2026-10-25 06:00:00", 
"2027-04-04 07:00:00", "2027-10-31 06:00:00", "2028-04-02 07:00:00", 
"2028-10-29 06:00:00", "2029-04-01 07:00:00", "2029-10-28 06:00:00", 
"2030-04-07 07:00:00", "2030-10-27 06:00:00"), class = "factor"), 
offSet = c(-14400, -18000, -14400, -18000, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -18000, -14400, -14400, -18000, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -14400, -18000, -14400, -18000, -14400, -18000, 
-14400, -18000, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000, -14400, -18000, -14400, -18000, -14400, 
-18000, -14400, -18000)), .Names = c("New_York", "offSet"
), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", 
"43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", 
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", 
"65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", 
"76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", 
"87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", 
"98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150", "151", 
"152", "153", "154", "155", "156", "157", "158", "159", "160", 
"161", "162", "163", "164", "165", "166", "167", "168", "169", 
"170", "171", "172", "173", "174", "175", "176", "177", "178", 
"179", "180", "181", "182", "183", "184", "185", "186", "187", 
"188", "189", "190", "191", "192", "193", "194", "195", "196", 
"197", "198", "199", "200", "201", "202", "203", "204", "205", 
"206", "207", "208", "209", "210", "211", "212", "213", "214", 
"215", "216", "217", "218", "219", "220", "221", "222", "223", 
"224", "225"), class = "data.frame") }


"Vancouver" <- function() {
structure(list(Vancouver = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 
153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 
166, 167, 168, 169, 170, 171, 172, 173, 174)), 
.Label = c("1918-04-14 10:00:00", 
"1918-10-31 09:00:00", "1942-02-09 10:00:00", "1945-09-30 09:00:00", 
"1946-04-28 10:00:00", "1946-10-13 09:00:00", "1947-04-27 10:00:00", 
"1947-09-28 09:00:00", "1948-04-25 10:00:00", "1948-09-26 09:00:00", 
"1949-04-24 10:00:00", "1949-09-25 09:00:00", "1950-04-30 10:00:00", 
"1950-09-24 09:00:00", "1951-04-29 10:00:00", "1951-09-30 09:00:00", 
"1952-04-27 10:00:00", "1952-09-28 09:00:00", "1953-04-26 10:00:00", 
"1953-09-27 09:00:00", "1954-04-25 10:00:00", "1954-09-26 09:00:00", 
"1955-04-24 10:00:00", "1955-09-25 09:00:00", "1956-04-29 10:00:00", 
"1956-09-30 09:00:00", "1957-04-28 10:00:00", "1957-09-29 09:00:00", 
"1958-04-27 10:00:00", "1958-09-28 09:00:00", "1959-04-26 10:00:00", 
"1959-09-27 09:00:00", "1960-04-24 10:00:00", "1960-09-25 09:00:00", 
"1961-04-30 10:00:00", "1961-09-24 09:00:00", "1962-04-29 10:00:00", 
"1962-10-28 09:00:00", "1963-04-28 10:00:00", "1963-10-27 09:00:00", 
"1964-04-26 10:00:00", "1964-10-25 09:00:00", "1965-04-25 10:00:00", 
"1965-10-31 09:00:00", "1966-04-24 10:00:00", "1966-10-30 09:00:00", 
"1967-04-30 10:00:00", "1967-10-29 09:00:00", "1968-04-28 10:00:00", 
"1968-10-27 09:00:00", "1969-04-27 10:00:00", "1969-10-26 09:00:00", 
"1970-04-26 10:00:00", "1970-10-25 09:00:00", "1971-04-25 10:00:00", 
"1971-10-31 09:00:00", "1972-04-30 10:00:00", "1972-10-29 09:00:00", 
"1973-04-29 10:00:00", "1973-10-28 09:00:00", "1974-04-28 10:00:00", 
"1974-10-27 09:00:00", "1975-04-27 10:00:00", "1975-10-26 09:00:00", 
"1976-04-25 10:00:00", "1976-10-31 09:00:00", "1977-04-24 10:00:00", 
"1977-10-30 09:00:00", "1978-04-30 10:00:00", "1978-10-29 09:00:00", 
"1979-04-29 10:00:00", "1979-10-28 09:00:00", "1980-04-27 10:00:00", 
"1980-10-26 09:00:00", "1981-04-26 10:00:00", "1981-10-25 09:00:00", 
"1982-04-25 10:00:00", "1982-10-31 09:00:00", "1983-04-24 10:00:00", 
"1983-10-30 09:00:00", "1984-04-29 10:00:00", "1984-10-28 09:00:00", 
"1985-04-28 10:00:00", "1985-10-27 09:00:00", "1986-04-27 10:00:00", 
"1986-10-26 09:00:00", "1987-04-05 10:00:00", "1987-10-25 09:00:00", 
"1988-04-03 10:00:00", "1988-10-30 09:00:00", "1989-04-02 10:00:00", 
"1989-10-29 09:00:00", "1990-04-01 10:00:00", "1990-10-28 09:00:00", 
"1991-04-07 10:00:00", "1991-10-27 09:00:00", "1992-04-05 10:00:00", 
"1992-10-25 09:00:00", "1993-04-04 10:00:00", "1993-10-31 09:00:00", 
"1994-04-03 10:00:00", "1994-10-30 09:00:00", "1995-04-02 10:00:00", 
"1995-10-29 09:00:00", "1996-04-07 10:00:00", "1996-10-27 09:00:00", 
"1997-04-06 10:00:00", "1997-10-26 09:00:00", "1998-04-05 10:00:00", 
"1998-10-25 09:00:00", "1999-04-04 10:00:00", "1999-10-31 09:00:00", 
"2000-04-02 10:00:00", "2000-10-29 09:00:00", "2001-04-01 10:00:00", 
"2001-10-28 09:00:00", "2002-04-07 10:00:00", "2002-10-27 09:00:00", 
"2003-04-06 10:00:00", "2003-10-26 09:00:00", "2004-04-04 10:00:00", 
"2004-10-31 09:00:00", "2005-04-03 10:00:00", "2005-10-30 09:00:00", 
"2006-04-02 10:00:00", "2006-10-29 09:00:00", "2007-04-01 10:00:00", 
"2007-10-28 09:00:00", "2008-04-06 10:00:00", "2008-10-26 09:00:00", 
"2009-04-05 10:00:00", "2009-10-25 09:00:00", "2010-04-04 10:00:00", 
"2010-10-31 09:00:00", "2011-04-03 10:00:00", "2011-10-30 09:00:00", 
"2012-04-01 10:00:00", "2012-10-28 09:00:00", "2013-04-07 10:00:00", 
"2013-10-27 09:00:00", "2014-04-06 10:00:00", "2014-10-26 09:00:00", 
"2015-04-05 10:00:00", "2015-10-25 09:00:00", "2016-04-03 10:00:00", 
"2016-10-30 09:00:00", "2017-04-02 10:00:00", "2017-10-29 09:00:00", 
"2018-04-01 10:00:00", "2018-10-28 09:00:00", "2019-04-07 10:00:00", 
"2019-10-27 09:00:00", "2020-04-05 10:00:00", "2020-10-25 09:00:00", 
"2021-04-04 10:00:00", "2021-10-31 09:00:00", "2022-04-03 10:00:00", 
"2022-10-30 09:00:00", "2023-04-02 10:00:00", "2023-10-29 09:00:00", 
"2024-04-07 10:00:00", "2024-10-27 09:00:00", "2025-04-06 10:00:00", 
"2025-10-26 09:00:00", "2026-04-05 10:00:00", "2026-10-25 09:00:00", 
"2027-04-04 10:00:00", "2027-10-31 09:00:00", "2028-04-02 10:00:00", 
"2028-10-29 09:00:00", "2029-04-01 10:00:00", "2029-10-28 09:00:00", 
"2030-04-07 10:00:00", "2030-10-27 09:00:00"), class = "factor"), 
offSet = c(-25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800, 
-25200, -28800, -25200, -28800, -25200, -28800, -25200, -28800
)), .Names = c("Vancouver", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128", "129", "130", "131", "132", "133", "134", "135", "136", 
"137", "138", "139", "140", "141", "142", "143", "144", "145", 
"146", "147", "148", "149", "150", "151", "152", "153", "154", 
"155", "156", "157", "158", "159", "160", "161", "162", "163", 
"164", "165", "166", "167", "168", "169", "170", "171", "172", 
"173", "174"), class = "data.frame") }


"Winnipeg" <- function() {
structure(list(Winnipeg = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 
153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 
166, 167, 168, 169, 170)), .Label = c("1916-04-23 06:00:00", 
"1916-09-17 05:00:00", "1918-04-14 08:00:00", "1918-10-31 07:00:00", 
"1937-05-16 08:00:00", "1937-09-26 07:00:00", "1942-02-09 08:00:00", 
"1945-09-30 07:00:00", "1946-05-12 08:00:00", "1946-10-13 07:00:00", 
"1947-04-27 08:00:00", "1947-09-28 07:00:00", "1948-04-25 08:00:00", 
"1948-09-26 07:00:00", "1949-04-24 08:00:00", "1949-09-25 07:00:00", 
"1950-05-01 08:00:00", "1950-09-30 07:00:00", "1951-04-29 08:00:00", 
"1951-09-30 07:00:00", "1952-04-27 08:00:00", "1952-09-28 07:00:00", 
"1953-04-26 08:00:00", "1953-09-27 07:00:00", "1954-04-25 08:00:00", 
"1954-09-26 07:00:00", "1955-04-24 08:00:00", "1955-09-25 07:00:00", 
"1956-04-29 08:00:00", "1956-09-30 07:00:00", "1957-04-28 08:00:00", 
"1957-09-29 07:00:00", "1958-04-27 08:00:00", "1958-09-28 07:00:00", 
"1959-04-26 08:00:00", "1959-10-25 07:00:00", "1960-04-24 08:00:00", 
"1960-09-25 07:00:00", "1963-04-28 08:00:00", "1963-09-22 07:00:00", 
"1966-04-24 08:00:00", "1966-10-30 07:00:00", "1967-04-30 08:00:00", 
"1967-10-29 07:00:00", "1968-04-28 08:00:00", "1968-10-27 07:00:00", 
"1969-04-27 08:00:00", "1969-10-26 07:00:00", "1970-04-26 08:00:00", 
"1970-10-25 07:00:00", "1971-04-25 08:00:00", "1971-10-31 07:00:00", 
"1972-04-30 08:00:00", "1972-10-29 07:00:00", "1973-04-29 08:00:00", 
"1973-10-28 07:00:00", "1974-04-28 08:00:00", "1974-10-27 07:00:00", 
"1975-04-27 08:00:00", "1975-10-26 07:00:00", "1976-04-25 08:00:00", 
"1976-10-31 07:00:00", "1977-04-24 08:00:00", "1977-10-30 07:00:00", 
"1978-04-30 08:00:00", "1978-10-29 07:00:00", "1979-04-29 08:00:00", 
"1979-10-28 07:00:00", "1980-04-27 08:00:00", "1980-10-26 07:00:00", 
"1981-04-26 08:00:00", "1981-10-25 07:00:00", "1982-04-25 08:00:00", 
"1982-10-31 07:00:00", "1983-04-24 08:00:00", "1983-10-30 07:00:00", 
"1984-04-29 08:00:00", "1984-10-28 07:00:00", "1985-04-28 08:00:00", 
"1985-10-27 07:00:00", "1986-04-27 08:00:00", "1986-10-26 07:00:00", 
"1987-04-05 08:00:00", "1987-10-25 08:00:00", "1988-04-03 08:00:00", 
"1988-10-30 08:00:00", "1989-04-02 08:00:00", "1989-10-29 08:00:00", 
"1990-04-01 08:00:00", "1990-10-28 08:00:00", "1991-04-07 08:00:00", 
"1991-10-27 08:00:00", "1992-04-05 08:00:00", "1992-10-25 08:00:00", 
"1993-04-04 08:00:00", "1993-10-31 08:00:00", "1994-04-03 08:00:00", 
"1994-10-30 08:00:00", "1995-04-02 08:00:00", "1995-10-29 08:00:00", 
"1996-04-07 08:00:00", "1996-10-27 08:00:00", "1997-04-06 08:00:00", 
"1997-10-26 08:00:00", "1998-04-05 08:00:00", "1998-10-25 08:00:00", 
"1999-04-04 08:00:00", "1999-10-31 08:00:00", "2000-04-02 08:00:00", 
"2000-10-29 08:00:00", "2001-04-01 08:00:00", "2001-10-28 08:00:00", 
"2002-04-07 08:00:00", "2002-10-27 08:00:00", "2003-04-06 08:00:00", 
"2003-10-26 08:00:00", "2004-04-04 08:00:00", "2004-10-31 08:00:00", 
"2005-04-03 08:00:00", "2005-10-30 08:00:00", "2006-04-02 08:00:00", 
"2006-10-29 08:00:00", "2007-04-01 08:00:00", "2007-10-28 08:00:00", 
"2008-04-06 08:00:00", "2008-10-26 08:00:00", "2009-04-05 08:00:00", 
"2009-10-25 08:00:00", "2010-04-04 08:00:00", "2010-10-31 08:00:00", 
"2011-04-03 08:00:00", "2011-10-30 08:00:00", "2012-04-01 08:00:00", 
"2012-10-28 08:00:00", "2013-04-07 08:00:00", "2013-10-27 08:00:00", 
"2014-04-06 08:00:00", "2014-10-26 08:00:00", "2015-04-05 08:00:00", 
"2015-10-25 08:00:00", "2016-04-03 08:00:00", "2016-10-30 08:00:00", 
"2017-04-02 08:00:00", "2017-10-29 08:00:00", "2018-04-01 08:00:00", 
"2018-10-28 08:00:00", "2019-04-07 08:00:00", "2019-10-27 08:00:00", 
"2020-04-05 08:00:00", "2020-10-25 08:00:00", "2021-04-04 08:00:00", 
"2021-10-31 08:00:00", "2022-04-03 08:00:00", "2022-10-30 08:00:00", 
"2023-04-02 08:00:00", "2023-10-29 08:00:00", "2024-04-07 08:00:00", 
"2024-10-27 08:00:00", "2025-04-06 08:00:00", "2025-10-26 08:00:00", 
"2026-04-05 08:00:00", "2026-10-25 08:00:00", "2027-04-04 08:00:00", 
"2027-10-31 08:00:00", "2028-04-02 08:00:00", "2028-10-29 08:00:00", 
"2029-04-01 08:00:00", "2029-10-28 08:00:00", "2030-04-07 08:00:00", 
"2030-10-27 08:00:00"), class = "factor"), offSet = c(-18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600, -18000, -21600, -18000, -21600, -18000, -21600, -18000, 
-21600)), .Names = c("Winnipeg", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128", "129", "130", "131", "132", "133", "134", "135", "136", 
"137", "138", "139", "140", "141", "142", "143", "144", "145", 
"146", "147", "148", "149", "150", "151", "152", "153", "154", 
"155", "156", "157", "158", "159", "160", "161", "162", "163", 
"164", "165", "166", "167", "168", "169", "170"), class = "data.frame") }


# ASIA -------------------------------------------------------------------------



"Bahrain" <- function() {
structure(list(Bahrain = structure(as.integer(1), 
.Label = "1972-05-31 20:00:00", class = "factor"), offSet = 10800), 
.Names = c("Bahrain", "offSet"), row.names = "1", class = "data.frame") }


"Bangkok" <- function() {
structure(list(Bangkok = structure(as.integer(1), 
.Label = "1920-03-31 17:17:56", class = "factor"), offSet = 25200), 
.Names = c("Bangkok", "offSet"), row.names = "1", class = "data.frame") }


"Beirut" <- function() {
structure(list(Beirut = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126)), 
.Label = c("1920-03-27 22:00:00", 
"1920-10-24 21:00:00", "1921-04-02 22:00:00", "1921-10-02 21:00:00", 
"1922-03-25 22:00:00", "1922-10-07 21:00:00", "1923-04-21 22:00:00", 
"1923-09-15 21:00:00", "1957-04-30 22:00:00", "1957-09-30 21:00:00", 
"1958-04-30 22:00:00", "1958-09-30 21:00:00", "1959-04-30 22:00:00", 
"1959-09-30 21:00:00", "1960-04-30 22:00:00", "1960-09-30 21:00:00", 
"1961-04-30 22:00:00", "1961-09-30 21:00:00", "1972-06-21 22:00:00", 
"1972-09-30 21:00:00", "1973-04-30 22:00:00", "1973-09-30 21:00:00", 
"1974-04-30 22:00:00", "1974-09-30 21:00:00", "1975-04-30 22:00:00", 
"1975-09-30 21:00:00", "1976-04-30 22:00:00", "1976-09-30 21:00:00", 
"1977-04-30 22:00:00", "1977-09-30 21:00:00", "1978-04-29 22:00:00", 
"1978-09-29 21:00:00", "1984-04-30 22:00:00", "1984-10-15 21:00:00", 
"1985-04-30 22:00:00", "1985-10-15 21:00:00", "1986-04-30 22:00:00", 
"1986-10-15 21:00:00", "1987-04-30 22:00:00", "1987-10-15 21:00:00", 
"1988-05-31 22:00:00", "1988-10-15 21:00:00", "1989-05-09 22:00:00", 
"1989-10-15 21:00:00", "1990-04-30 22:00:00", "1990-10-15 21:00:00", 
"1991-04-30 22:00:00", "1991-10-15 21:00:00", "1992-04-30 22:00:00", 
"1992-10-03 21:00:00", "1993-03-27 22:00:00", "1993-09-25 21:00:00", 
"1994-03-26 22:00:00", "1994-09-24 21:00:00", "1995-03-25 22:00:00", 
"1995-09-23 21:00:00", "1996-03-30 22:00:00", "1996-09-28 21:00:00", 
"1997-03-29 22:00:00", "1997-09-27 21:00:00", "1998-03-28 22:00:00", 
"1998-09-26 21:00:00", "1999-03-27 22:00:00", "1999-10-30 21:00:00", 
"2000-03-25 22:00:00", "2000-10-28 21:00:00", "2001-03-24 22:00:00", 
"2001-10-27 21:00:00", "2002-03-30 22:00:00", "2002-10-26 21:00:00", 
"2003-03-29 22:00:00", "2003-10-25 21:00:00", "2004-03-27 22:00:00", 
"2004-10-30 21:00:00", "2005-03-26 22:00:00", "2005-10-29 21:00:00", 
"2006-03-25 22:00:00", "2006-10-28 21:00:00", "2007-03-24 22:00:00", 
"2007-10-27 21:00:00", "2008-03-29 22:00:00", "2008-10-25 21:00:00", 
"2009-03-28 22:00:00", "2009-10-24 21:00:00", "2010-03-27 22:00:00", 
"2010-10-30 21:00:00", "2011-03-26 22:00:00", "2011-10-29 21:00:00", 
"2012-03-24 22:00:00", "2012-10-27 21:00:00", "2013-03-30 22:00:00", 
"2013-10-26 21:00:00", "2014-03-29 22:00:00", "2014-10-25 21:00:00", 
"2015-03-28 22:00:00", "2015-10-24 21:00:00", "2016-03-26 22:00:00", 
"2016-10-29 21:00:00", "2017-03-25 22:00:00", "2017-10-28 21:00:00", 
"2018-03-24 22:00:00", "2018-10-27 21:00:00", "2019-03-30 22:00:00", 
"2019-10-26 21:00:00", "2020-03-28 22:00:00", "2020-10-24 21:00:00", 
"2021-03-27 22:00:00", "2021-10-30 21:00:00", "2022-03-26 22:00:00", 
"2022-10-29 21:00:00", "2023-03-25 22:00:00", "2023-10-28 21:00:00", 
"2024-03-30 22:00:00", "2024-10-26 21:00:00", "2025-03-29 22:00:00", 
"2025-10-25 21:00:00", "2026-03-28 22:00:00", "2026-10-24 21:00:00", 
"2027-03-27 22:00:00", "2027-10-30 21:00:00", "2028-03-25 22:00:00", 
"2028-10-28 21:00:00", "2029-03-24 22:00:00", "2029-10-27 21:00:00", 
"2030-03-30 22:00:00", "2030-10-26 21:00:00"), class = "factor"), 
offSet = c(10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200)), .Names = c("Beirut", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126"), class = "data.frame") }


"Calcutta" <- function() {
structure(list(Calcutta = structure(as.integer(c(1, 2, 3, 4)), 
.Label = c("1941-09-30 18:06:40", 
"1942-05-14 17:30:00", "1942-08-31 18:30:00", "1945-10-14 17:30:00"
), class = "factor"), offSet = c(23400, 19800, 23400, 19800)), 
.Names = c("Calcutta", 
"offSet"), row.names = c("1", "2", "3", "4"), class = "data.frame") }


"Dubai" <- function() {
structure(list(Dubai = structure(as.integer(1), 
.Label = "1919-12-31 20:18:48", class = "factor"), offSet = 14400), 
.Names = c("Dubai", "offSet"), row.names = "1", class = "data.frame") }


"HongKong" <- function() {
structure(list(HongKong = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68)), 
.Label = c("1946-04-19 19:30:00", 
"1946-11-30 18:30:00", "1947-04-12 19:30:00", "1947-12-29 18:30:00", 
"1948-05-01 19:30:00", "1948-10-30 18:30:00", "1949-04-02 19:30:00", 
"1949-10-29 18:30:00", "1950-04-01 19:30:00", "1950-10-28 18:30:00", 
"1951-03-31 19:30:00", "1951-10-27 18:30:00", "1952-04-05 19:30:00", 
"1952-10-25 18:30:00", "1953-04-04 19:30:00", "1953-10-31 18:30:00", 
"1954-03-20 19:30:00", "1954-10-30 18:30:00", "1955-03-19 19:30:00", 
"1955-11-05 18:30:00", "1956-03-17 19:30:00", "1956-11-03 18:30:00", 
"1957-03-23 19:30:00", "1957-11-02 18:30:00", "1958-03-22 19:30:00", 
"1958-11-01 18:30:00", "1959-03-21 19:30:00", "1959-10-31 18:30:00", 
"1960-03-19 19:30:00", "1960-11-05 18:30:00", "1961-03-18 19:30:00", 
"1961-11-04 18:30:00", "1962-03-17 19:30:00", "1962-11-03 18:30:00", 
"1963-03-23 19:30:00", "1963-11-02 18:30:00", "1964-03-21 19:30:00", 
"1964-10-31 18:30:00", "1965-04-17 19:30:00", "1965-10-16 18:30:00", 
"1966-04-16 19:30:00", "1966-10-15 18:30:00", "1967-04-15 19:30:00", 
"1967-10-21 18:30:00", "1968-04-20 19:30:00", "1968-10-19 18:30:00", 
"1969-04-19 19:30:00", "1969-10-18 18:30:00", "1970-04-18 19:30:00", 
"1970-10-17 18:30:00", "1971-04-17 19:30:00", "1971-10-16 18:30:00", 
"1972-04-15 19:30:00", "1972-10-21 18:30:00", "1973-04-21 19:30:00", 
"1973-10-20 18:30:00", "1974-04-20 19:30:00", "1974-10-19 18:30:00", 
"1975-04-19 19:30:00", "1975-10-18 18:30:00", "1976-04-17 19:30:00", 
"1976-10-16 18:30:00", "1977-04-16 19:30:00", "1977-10-15 18:30:00", 
"1979-05-12 19:30:00", "1979-10-20 18:30:00", "1980-05-10 19:30:00", 
"1980-10-18 18:30:00"), class = "factor"), offSet = c(32400, 
28800, 32400, 28800, 32400, 28800, 32400, 28800, 32400, 28800, 
32400, 28800, 32400, 28800, 32400, 28800, 32400, 28800, 32400, 
28800, 32400, 28800, 32400, 28800, 32400, 28800, 32400, 28800, 
32400, 28800, 32400, 28800, 32400, 28800, 32400, 28800, 32400, 
28800, 32400, 28800, 32400, 28800, 32400, 28800, 32400, 28800, 
32400, 28800, 32400, 28800, 32400, 28800, 32400, 28800, 32400, 
28800, 32400, 28800, 32400, 28800, 32400, 28800, 32400, 28800, 
32400, 28800, 32400, 28800)), .Names = c("Hong_Kong", "offSet"
), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", 
"43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", 
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", 
"65", "66", "67", "68"), class = "data.frame") }


"Jakarta" <- function() {
structure(list(Jakarta = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7)), .Label = c("1923-12-31 16:40:00", "1932-10-31 16:40:00", 
"1942-03-22 16:30:00", "1945-07-31 15:00:00", "1948-04-30 16:30:00", 
"1950-04-30 16:00:00", "1963-12-31 16:30:00"), class = "factor"), 
offSet = c(26400, 27000, 32400, 27000, 28800, 27000, 25200
)), .Names = c("Jakarta", "offSet"), row.names = c("1", "2", 
"3", "4", "5", "6", "7"), class = "data.frame") }


"Jerusalem" <- function() {
structure(list(Jerusalem = structure(as.integer(c(1, 2, 3, NA, 
4, 5, 6, 7, 8, NA, 9, 10, 11, 12, 13, 14, 15, NA, 16, NA, NA, 
NA, NA, NA, 17, 18, NA, 19, 20, NA, NA, 21, 22, 23, 24, 25, 26, 
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 
43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, NA, 54, NA, 55, 56, 
57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 
89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 
104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115)), 
.Label = c("1917-12-31 21:39:20", 
"1940-05-31 22:00:00", "1942-10-31 21:00:00", "1943-10-31 21:00:00", 
"1944-03-31 22:00:00", "1944-10-31 21:00:00", "1945-04-15 22:00:00", 
"1945-10-31 23:00:00", "1946-10-31 21:00:00", "1948-05-22 22:00:00", 
"1948-08-31 20:00:00", "1948-10-31 23:00:00", "1949-04-30 22:00:00", 
"1949-10-31 23:00:00", "1950-04-15 22:00:00", "1951-03-31 22:00:00", 
"1954-06-12 22:00:00", "1954-09-11 21:00:00", "1955-09-10 21:00:00", 
"1956-06-02 22:00:00", "1957-09-21 21:00:00", "1974-07-06 22:00:00", 
"1974-10-12 21:00:00", "1975-04-19 22:00:00", "1975-08-30 21:00:00", 
"1985-04-13 22:00:00", "1985-09-14 21:00:00", "1986-05-17 22:00:00", 
"1986-09-06 21:00:00", "1987-04-14 22:00:00", "1987-09-12 21:00:00", 
"1988-04-08 22:00:00", "1988-09-02 21:00:00", "1989-04-29 22:00:00", 
"1989-09-02 21:00:00", "1990-03-24 22:00:00", "1990-08-25 21:00:00", 
"1991-03-23 22:00:00", "1991-08-31 21:00:00", "1992-03-28 22:00:00", 
"1992-09-05 21:00:00", "1993-04-01 22:00:00", "1993-09-04 21:00:00", 
"1994-03-31 22:00:00", "1994-08-27 21:00:00", "1995-03-30 22:00:00", 
"1995-09-02 21:00:00", "1996-03-14 22:00:00", "1996-09-15 21:00:00", 
"1997-03-20 22:00:00", "1997-09-13 21:00:00", "1998-03-19 22:00:00", 
"1998-09-05 21:00:00", "1999-09-02 23:00:00", "2000-10-05 22:00:00", 
"2001-04-08 23:00:00", "2001-09-23 22:00:00", "2002-03-28 23:00:00", 
"2002-10-06 22:00:00", "2003-03-27 23:00:00", "2003-10-02 22:00:00", 
"2004-04-06 23:00:00", "2004-09-21 22:00:00", "2005-03-31 23:00:00", 
"2005-09-30 22:00:00", "2006-03-31 23:00:00", "2006-09-30 22:00:00", 
"2007-03-31 23:00:00", "2007-09-30 22:00:00", "2008-03-31 23:00:00", 
"2008-09-30 22:00:00", "2009-03-31 23:00:00", "2009-09-30 22:00:00", 
"2010-03-31 23:00:00", "2010-09-30 22:00:00", "2011-03-31 23:00:00", 
"2011-09-30 22:00:00", "2012-03-31 23:00:00", "2012-09-30 22:00:00", 
"2013-03-31 23:00:00", "2013-09-30 22:00:00", "2014-03-31 23:00:00", 
"2014-09-30 22:00:00", "2015-03-31 23:00:00", "2015-09-30 22:00:00", 
"2016-03-31 23:00:00", "2016-09-30 22:00:00", "2017-03-31 23:00:00", 
"2017-09-30 22:00:00", "2018-03-31 23:00:00", "2018-09-30 22:00:00", 
"2019-03-31 23:00:00", "2019-09-30 22:00:00", "2020-03-31 23:00:00", 
"2020-09-30 22:00:00", "2021-03-31 23:00:00", "2021-09-30 22:00:00", 
"2022-03-31 23:00:00", "2022-09-30 22:00:00", "2023-03-31 23:00:00", 
"2023-09-30 22:00:00", "2024-03-31 23:00:00", "2024-09-30 22:00:00", 
"2025-03-31 23:00:00", "2025-09-30 22:00:00", "2026-03-31 23:00:00", 
"2026-09-30 22:00:00", "2027-03-31 23:00:00", "2027-09-30 22:00:00", 
"2028-03-31 23:00:00", "2028-09-30 22:00:00", "2029-03-31 23:00:00", 
"2029-09-30 22:00:00", "2030-03-31 23:00:00", "2030-09-30 22:00:00"
), class = "factor"), offSet = c(7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 14400, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200)), .Names = c("Jerusalem", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128"), class = "data.frame") }


"KualaLumpur" <- function() {
structure(list(KualaLumpur = structure(as.integer(c(1, 2, 3, 
4, 5, 6)), .Label = c("1905-05-31 17:04:36", "1932-12-31 17:00:00", 
"1942-02-14 16:40:00", "1945-09-01 15:00:00", "1949-12-31 16:40:00", 
"1982-04-30 16:30:00"), class = "factor"), offSet = c(25200, 
26400, 32400, 26400, 27000, 28800)), .Names = c("Kuala_Lumpur", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6"), class = "data.frame") }


"Kuwait" <- function() {
structure(list(Kuwait = structure(as.integer(1), 
.Label = "1949-12-31 20:48:04", class = "factor"), offSet = 10800), 
.Names = c("Kuwait", "offSet"), row.names = "1", class = "data.frame") }


"Manila" <- function() {
structure(list(Manila = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9)), .Label = c("1899-05-10 15:56:00", "1936-10-31 16:00:00", 
"1937-01-31 15:00:00", "1942-04-30 16:00:00", "1944-10-31 15:00:00", 
"1954-04-11 16:00:00", "1954-06-30 15:00:00", "1978-03-21 16:00:00", 
"1978-09-20 15:00:00"), class = "factor"), offSet = c(28800, 
32400, 28800, 32400, 28800, 32400, 28800, 32400, 28800)), .Names = c("Manila", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9"), class = "data.frame") }


"Riyadh" <- function() {
structure(list(Riyadh = structure(as.integer(1), 
.Label = "1949-12-31 20:53:08", class = "factor"), offSet = 10800), 
.Names = c("Riyadh", "offSet"), row.names = "1", class = "data.frame") }


"Seoul" <- function() {
structure(list(Seoul = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12)), 
.Label = c("1904-11-30 15:30:00", "1927-12-31 15:00:00", 
"1931-12-31 15:30:00", "1954-03-20 15:00:00", "1960-05-14 16:00:00", 
"1960-09-12 15:00:00", "1961-08-09 16:00:00", "1968-09-30 15:30:00", 
"1987-05-09 15:00:00", "1987-10-10 14:00:00", "1988-05-07 15:00:00", 
"1988-10-08 14:00:00"), class = "factor"), offSet = c(32400, 
30600, 32400, 28800, 32400, 28800, 30600, 32400, 36000, 32400, 
36000, 32400)), .Names = c("Seoul", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"), 
class = "data.frame") }


"Shanghai" <- function() {
structure(list(Shanghai = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)), 
.Label = c("1940-06-02 16:00:00", 
"1940-09-30 15:00:00", "1941-03-15 16:00:00", "1941-09-30 15:00:00", 
"1948-12-31 16:00:00", "1986-05-03 16:00:00", "1986-09-13 15:00:00", 
"1987-04-11 16:00:00", "1987-09-12 15:00:00", "1988-04-09 16:00:00", 
"1988-09-10 15:00:00", "1989-04-15 16:00:00", "1989-09-16 15:00:00", 
"1990-04-14 16:00:00", "1990-09-15 15:00:00", "1991-04-13 16:00:00", 
"1991-09-14 15:00:00"), class = "factor"), offSet = c(32400, 
28800, 32400, 28800, 28800, 32400, 28800, 32400, 28800, 32400, 
28800, 32400, 28800, 32400, 28800, 32400, 28800)), .Names = c("Shanghai", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17"), class = "data.frame") }


"Singapore" <- function() {
structure(list(Singapore = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7)), .Label = c("1905-05-31 17:04:36", "1932-12-31 17:00:00", 
"1942-02-14 16:40:00", "1945-09-01 15:00:00", "1949-12-31 16:40:00", 
"1965-08-08 16:30:00", "1982-04-30 16:30:00"), class = "factor"), 
offSet = c(25200, 26400, 32400, 26400, 27000, 27000, 28800
)), .Names = c("Singapore", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7"), class = "data.frame") }


"Taipei" <- function() {
structure(list(Taipei = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40)), .Label = c("1945-04-30 16:00:00", "1945-09-30 15:00:00", 
"1946-04-30 16:00:00", "1946-09-30 15:00:00", "1947-04-30 16:00:00", 
"1947-09-30 15:00:00", "1948-04-30 16:00:00", "1948-09-30 15:00:00", 
"1949-04-30 16:00:00", "1949-09-30 15:00:00", "1950-04-30 16:00:00", 
"1950-09-30 15:00:00", "1951-04-30 16:00:00", "1951-09-30 15:00:00", 
"1952-02-29 16:00:00", "1952-10-31 15:00:00", "1953-03-31 16:00:00", 
"1953-10-31 15:00:00", "1954-03-31 16:00:00", "1954-10-31 15:00:00", 
"1955-03-31 16:00:00", "1955-09-30 15:00:00", "1956-03-31 16:00:00", 
"1956-09-30 15:00:00", "1957-03-31 16:00:00", "1957-09-30 15:00:00", 
"1958-03-31 16:00:00", "1958-09-30 15:00:00", "1959-03-31 16:00:00", 
"1959-09-30 15:00:00", "1960-05-31 16:00:00", "1960-09-30 15:00:00", 
"1961-05-31 16:00:00", "1961-09-30 15:00:00", "1974-03-31 16:00:00", 
"1974-09-30 15:00:00", "1975-03-31 16:00:00", "1975-09-30 15:00:00", 
"1980-06-29 16:00:00", "1980-09-29 15:00:00"), class = "factor"), 
offSet = c(32400, 28800, 32400, 28800, 32400, 28800, 32400, 
28800, 32400, 28800, 32400, 28800, 32400, 28800, 32400, 28800, 
32400, 28800, 32400, 28800, 32400, 28800, 32400, 28800, 32400, 
28800, 32400, 28800, 32400, 28800, 32400, 28800, 32400, 28800, 
32400, 28800, 32400, 28800, 32400, 28800)), .Names = c("Taipei", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40"), 
class = "data.frame") }


"Tehran" <- function() {
structure(list(Tehran = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89)), .Label = c("1945-12-31 20:34:16", "1977-10-31 20:30:00", 
"1978-03-20 20:00:00", "1978-10-20 19:00:00", "1978-12-31 20:00:00", 
"1979-03-20 20:30:00", "1979-09-18 19:30:00", "1980-03-20 20:30:00", 
"1980-09-22 19:30:00", "1991-05-02 20:30:00", "1991-09-19 20:30:00", 
"1992-03-20 20:30:00", "1992-09-22 19:30:00", "1993-03-20 20:30:00", 
"1993-09-22 19:30:00", "1994-03-20 20:30:00", "1994-09-22 19:30:00", 
"1995-03-20 20:30:00", "1995-09-22 19:30:00", "1996-03-19 20:30:00", 
"1996-09-21 19:30:00", "1997-03-20 20:30:00", "1997-09-22 19:30:00", 
"1998-03-20 20:30:00", "1998-09-22 19:30:00", "1999-03-20 20:30:00", 
"1999-09-22 19:30:00", "2000-03-19 20:30:00", "2000-09-21 19:30:00", 
"2001-03-20 20:30:00", "2001-09-22 19:30:00", "2002-03-20 20:30:00", 
"2002-09-22 19:30:00", "2003-03-20 20:30:00", "2003-09-22 19:30:00", 
"2004-03-19 20:30:00", "2004-09-21 19:30:00", "2005-03-20 20:30:00", 
"2005-09-22 19:30:00", "2006-03-20 20:30:00", "2006-09-22 19:30:00", 
"2007-03-20 20:30:00", "2007-09-22 19:30:00", "2008-03-19 20:30:00", 
"2008-09-21 19:30:00", "2009-03-20 20:30:00", "2009-09-22 19:30:00", 
"2010-03-20 20:30:00", "2010-09-22 19:30:00", "2011-03-20 20:30:00", 
"2011-09-22 19:30:00", "2012-03-19 20:30:00", "2012-09-21 19:30:00", 
"2013-03-20 20:30:00", "2013-09-22 19:30:00", "2014-03-20 20:30:00", 
"2014-09-22 19:30:00", "2015-03-20 20:30:00", "2015-09-22 19:30:00", 
"2016-03-19 20:30:00", "2016-09-21 19:30:00", "2017-03-20 20:30:00", 
"2017-09-22 19:30:00", "2018-03-20 20:30:00", "2018-09-22 19:30:00", 
"2019-03-20 20:30:00", "2019-09-22 19:30:00", "2020-03-19 20:30:00", 
"2020-09-21 19:30:00", "2021-03-20 20:30:00", "2021-09-22 19:30:00", 
"2022-03-20 20:30:00", "2022-09-22 19:30:00", "2023-03-20 20:30:00", 
"2023-09-22 19:30:00", "2024-03-19 20:30:00", "2024-09-21 19:30:00", 
"2025-03-19 20:30:00", "2025-09-21 19:30:00", "2026-03-20 20:30:00", 
"2026-09-22 19:30:00", "2027-03-20 20:30:00", "2027-09-22 19:30:00", 
"2028-03-19 20:30:00", "2028-09-21 19:30:00", "2029-03-19 20:30:00", 
"2029-09-21 19:30:00", "2030-03-20 20:30:00", "2030-09-22 19:30:00"
), class = "factor"), offSet = c(12600, 14400, 18000, 14400, 
12600, 16200, 12600, 16200, 12600, 16200, 12600, 16200, 12600, 
16200, 12600, 16200, 12600, 16200, 12600, 16200, 12600, 16200, 
12600, 16200, 12600, 16200, 12600, 16200, 12600, 16200, 12600, 
16200, 12600, 16200, 12600, 16200, 12600, 16200, 12600, 16200, 
12600, 16200, 12600, 16200, 12600, 16200, 12600, 16200, 12600, 
16200, 12600, 16200, 12600, 16200, 12600, 16200, 12600, 16200, 
12600, 16200, 12600, 16200, 12600, 16200, 12600, 16200, 12600, 
16200, 12600, 16200, 12600, 16200, 12600, 16200, 12600, 16200, 
12600, 16200, 12600, 16200, 12600, 16200, 12600, 16200, 12600, 
16200, 12600, 16200, 12600)), .Names = c("Tehran", "offSet"), 
row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89"), 
class = "data.frame") }


"Tokyo" <- function() {
structure(list(Tokyo = structure(as.integer(c(1, 2)), 
.Label = c("1895-12-31 15:00:00", 
"1937-12-31 15:00:00"), class = "factor"), offSet = c(32400, 
32400)), .Names = c("Tokyo", "offSet"), row.names = c("1", "2"
), class = "data.frame") }


# AUSTRALIA --------------------------------------------------------------------


"Adelaide" <- function() {
structure(list(Adelaide = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129)), .Label = c("1899-04-30 15:00:00", "1916-12-31 14:31:00", 
"1917-03-24 15:30:00", "1941-12-31 16:30:00", "1942-03-28 15:30:00", 
"1942-09-26 16:30:00", "1943-03-27 15:30:00", "1943-10-02 16:30:00", 
"1944-03-25 15:30:00", "1970-12-31 14:30:00", "1971-10-30 16:30:00", 
"1972-02-26 16:30:00", "1972-10-28 16:30:00", "1973-03-03 16:30:00", 
"1973-10-27 16:30:00", "1974-03-02 16:30:00", "1974-10-26 16:30:00", 
"1975-03-01 16:30:00", "1975-10-25 16:30:00", "1976-03-06 16:30:00", 
"1976-10-30 16:30:00", "1977-03-05 16:30:00", "1977-10-29 16:30:00", 
"1978-03-04 16:30:00", "1978-10-28 16:30:00", "1979-03-03 16:30:00", 
"1979-10-27 16:30:00", "1980-03-01 16:30:00", "1980-10-25 16:30:00", 
"1981-02-28 16:30:00", "1981-10-24 16:30:00", "1982-03-06 16:30:00", 
"1982-10-30 16:30:00", "1983-03-05 16:30:00", "1983-10-29 16:30:00", 
"1984-03-03 16:30:00", "1984-10-27 16:30:00", "1985-03-02 16:30:00", 
"1985-10-26 16:30:00", "1986-03-15 16:30:00", "1986-10-18 16:30:00", 
"1987-03-14 16:30:00", "1987-10-24 16:30:00", "1988-03-19 16:30:00", 
"1988-10-29 16:30:00", "1989-03-18 16:30:00", "1989-10-28 16:30:00", 
"1990-03-17 16:30:00", "1990-10-27 16:30:00", "1991-03-02 16:30:00", 
"1991-10-26 16:30:00", "1992-03-21 16:30:00", "1992-10-24 16:30:00", 
"1993-03-06 16:30:00", "1993-10-30 16:30:00", "1994-03-19 16:30:00", 
"1994-10-29 16:30:00", "1995-03-25 16:30:00", "1995-10-28 16:30:00", 
"1996-03-30 16:30:00", "1996-10-26 16:30:00", "1997-03-29 16:30:00", 
"1997-10-25 16:30:00", "1998-03-28 16:30:00", "1998-10-24 16:30:00", 
"1999-03-27 16:30:00", "1999-10-30 16:30:00", "2000-03-25 16:30:00", 
"2000-10-28 16:30:00", "2001-03-24 16:30:00", "2001-10-27 16:30:00", 
"2002-03-30 16:30:00", "2002-10-26 16:30:00", "2003-03-29 16:30:00", 
"2003-10-25 16:30:00", "2004-03-27 16:30:00", "2004-10-30 16:30:00", 
"2005-03-26 16:30:00", "2005-10-29 16:30:00", "2006-03-25 16:30:00", 
"2006-10-28 16:30:00", "2007-03-24 16:30:00", "2007-10-27 16:30:00", 
"2008-03-29 16:30:00", "2008-10-25 16:30:00", "2009-03-28 16:30:00", 
"2009-10-24 16:30:00", "2010-03-27 16:30:00", "2010-10-30 16:30:00", 
"2011-03-26 16:30:00", "2011-10-29 16:30:00", "2012-03-24 16:30:00", 
"2012-10-27 16:30:00", "2013-03-30 16:30:00", "2013-10-26 16:30:00", 
"2014-03-29 16:30:00", "2014-10-25 16:30:00", "2015-03-28 16:30:00", 
"2015-10-24 16:30:00", "2016-03-26 16:30:00", "2016-10-29 16:30:00", 
"2017-03-25 16:30:00", "2017-10-28 16:30:00", "2018-03-24 16:30:00", 
"2018-10-27 16:30:00", "2019-03-30 16:30:00", "2019-10-26 16:30:00", 
"2020-03-28 16:30:00", "2020-10-24 16:30:00", "2021-03-27 16:30:00", 
"2021-10-30 16:30:00", "2022-03-26 16:30:00", "2022-10-29 16:30:00", 
"2023-03-25 16:30:00", "2023-10-28 16:30:00", "2024-03-30 16:30:00", 
"2024-10-26 16:30:00", "2025-03-29 16:30:00", "2025-10-25 16:30:00", 
"2026-03-28 16:30:00", "2026-10-24 16:30:00", "2027-03-27 16:30:00", 
"2027-10-30 16:30:00", "2028-03-25 16:30:00", "2028-10-28 16:30:00", 
"2029-03-24 16:30:00", "2029-10-27 16:30:00", "2030-03-30 16:30:00", 
"2030-10-26 16:30:00"), class = "factor"), offSet = c(34200, 
37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 34200, 
37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 
34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 
37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 
34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 
37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 
34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 
37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 
34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 
37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 
34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 
37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 
34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 
37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200, 37800, 
34200, 37800)), .Names = c("Adelaide", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128", "129"), class = "data.frame") }


"Brisbane" <- function() {
structure(list(Brisbane = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)), 
.Label = c("1916-12-31 14:01:00", 
"1917-03-24 15:00:00", "1941-12-31 16:00:00", "1942-03-28 15:00:00", 
"1942-09-26 16:00:00", "1943-03-27 15:00:00", "1943-10-02 16:00:00", 
"1944-03-25 15:00:00", "1970-12-31 14:00:00", "1971-10-30 16:00:00", 
"1972-02-26 16:00:00", "1989-10-28 16:00:00", "1990-03-03 16:00:00", 
"1990-10-27 16:00:00", "1991-03-02 16:00:00", "1991-10-26 16:00:00", 
"1992-02-29 16:00:00"), class = "factor"), offSet = c(39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000)), .Names = c("Brisbane", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17"), class = "data.frame") }


"Darwin" <- function() {
structure(list(Darwin = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9)), .Label = c("1899-04-30 15:00:00", "1916-12-31 14:31:00", 
"1917-03-24 15:30:00", "1941-12-31 16:30:00", "1942-03-28 15:30:00", 
"1942-09-26 16:30:00", "1943-03-27 15:30:00", "1943-10-02 16:30:00", 
"1944-03-25 15:30:00"), class = "factor"), offSet = c(34200, 
37800, 34200, 37800, 34200, 37800, 34200, 37800, 34200)), 
.Names = c("Darwin", "offSet"), row.names = c("1", "2", "3", "4", "5", 
"6", "7", "8", "9"), class = "data.frame") }


"Melbourne" <- function() {
structure(list(Melbourne = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128)), .Label = c("1916-12-31 14:01:00", "1917-03-24 15:00:00", 
"1941-12-31 16:00:00", "1942-03-28 15:00:00", "1942-09-26 16:00:00", 
"1943-03-27 15:00:00", "1943-10-02 16:00:00", "1944-03-25 15:00:00", 
"1970-12-31 14:00:00", "1971-10-30 16:00:00", "1972-02-26 16:00:00", 
"1972-10-28 16:00:00", "1973-03-03 16:00:00", "1973-10-27 16:00:00", 
"1974-03-02 16:00:00", "1974-10-26 16:00:00", "1975-03-01 16:00:00", 
"1975-10-25 16:00:00", "1976-03-06 16:00:00", "1976-10-30 16:00:00", 
"1977-03-05 16:00:00", "1977-10-29 16:00:00", "1978-03-04 16:00:00", 
"1978-10-28 16:00:00", "1979-03-03 16:00:00", "1979-10-27 16:00:00", 
"1980-03-01 16:00:00", "1980-10-25 16:00:00", "1981-02-28 16:00:00", 
"1981-10-24 16:00:00", "1982-03-06 16:00:00", "1982-10-30 16:00:00", 
"1983-03-05 16:00:00", "1983-10-29 16:00:00", "1984-03-03 16:00:00", 
"1984-10-27 16:00:00", "1985-03-02 16:00:00", "1985-10-26 16:00:00", 
"1986-03-15 16:00:00", "1986-10-18 16:00:00", "1987-03-14 16:00:00", 
"1987-10-17 16:00:00", "1988-03-19 16:00:00", "1988-10-29 16:00:00", 
"1989-03-18 16:00:00", "1989-10-28 16:00:00", "1990-03-17 16:00:00", 
"1990-10-27 16:00:00", "1991-03-02 16:00:00", "1991-10-26 16:00:00", 
"1992-02-29 16:00:00", "1992-10-24 16:00:00", "1993-03-06 16:00:00", 
"1993-10-30 16:00:00", "1994-03-05 16:00:00", "1994-10-29 16:00:00", 
"1995-03-25 16:00:00", "1995-10-28 16:00:00", "1996-03-30 16:00:00", 
"1996-10-26 16:00:00", "1997-03-29 16:00:00", "1997-10-25 16:00:00", 
"1998-03-28 16:00:00", "1998-10-24 16:00:00", "1999-03-27 16:00:00", 
"1999-10-30 16:00:00", "2000-03-25 16:00:00", "2000-08-26 16:00:00", 
"2001-03-24 16:00:00", "2001-10-27 16:00:00", "2002-03-30 16:00:00", 
"2002-10-26 16:00:00", "2003-03-29 16:00:00", "2003-10-25 16:00:00", 
"2004-03-27 16:00:00", "2004-10-30 16:00:00", "2005-03-26 16:00:00", 
"2005-10-29 16:00:00", "2006-03-25 16:00:00", "2006-10-28 16:00:00", 
"2007-03-24 16:00:00", "2007-10-27 16:00:00", "2008-03-29 16:00:00", 
"2008-10-25 16:00:00", "2009-03-28 16:00:00", "2009-10-24 16:00:00", 
"2010-03-27 16:00:00", "2010-10-30 16:00:00", "2011-03-26 16:00:00", 
"2011-10-29 16:00:00", "2012-03-24 16:00:00", "2012-10-27 16:00:00", 
"2013-03-30 16:00:00", "2013-10-26 16:00:00", "2014-03-29 16:00:00", 
"2014-10-25 16:00:00", "2015-03-28 16:00:00", "2015-10-24 16:00:00", 
"2016-03-26 16:00:00", "2016-10-29 16:00:00", "2017-03-25 16:00:00", 
"2017-10-28 16:00:00", "2018-03-24 16:00:00", "2018-10-27 16:00:00", 
"2019-03-30 16:00:00", "2019-10-26 16:00:00", "2020-03-28 16:00:00", 
"2020-10-24 16:00:00", "2021-03-27 16:00:00", "2021-10-30 16:00:00", 
"2022-03-26 16:00:00", "2022-10-29 16:00:00", "2023-03-25 16:00:00", 
"2023-10-28 16:00:00", "2024-03-30 16:00:00", "2024-10-26 16:00:00", 
"2025-03-29 16:00:00", "2025-10-25 16:00:00", "2026-03-28 16:00:00", 
"2026-10-24 16:00:00", "2027-03-27 16:00:00", "2027-10-30 16:00:00", 
"2028-03-25 16:00:00", "2028-10-28 16:00:00", "2029-03-24 16:00:00", 
"2029-10-27 16:00:00", "2030-03-30 16:00:00", "2030-10-26 16:00:00"
), class = "factor"), offSet = c(39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600)), .Names = c("Melbourne", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128"), class = "data.frame") }


"Perth" <- function() {
structure(list(Perth = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13)), .Label = c("1916-12-31 16:01:00", 
"1917-03-24 17:00:00", "1941-12-31 18:00:00", "1942-03-28 17:00:00", 
"1942-09-26 18:00:00", "1943-03-27 17:00:00", "1943-06-30 16:00:00", 
"1974-10-26 18:00:00", "1975-03-01 18:00:00", "1983-10-29 18:00:00", 
"1984-03-03 18:00:00", "1991-11-16 18:00:00", "1992-02-29 18:00:00"
), class = "factor"), offSet = c(32400, 28800, 32400, 28800, 
32400, 28800, 28800, 32400, 28800, 32400, 28800, 32400, 28800
)), .Names = c("Perth", "offSet"), row.names = c("1", "2", "3", 
"4", "5", "6", "7", "8", "9", "10", "11", "12", "13"), class = "data.frame") }


"Sydney" <- function() {
structure(list(Sydney = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 
128)), .Label = c("1916-12-31 14:01:00", "1917-03-24 15:00:00", 
"1941-12-31 16:00:00", "1942-03-28 15:00:00", "1942-09-26 16:00:00", 
"1943-03-27 15:00:00", "1943-10-02 16:00:00", "1944-03-25 15:00:00", 
"1970-12-31 14:00:00", "1971-10-30 16:00:00", "1972-02-26 16:00:00", 
"1972-10-28 16:00:00", "1973-03-03 16:00:00", "1973-10-27 16:00:00", 
"1974-03-02 16:00:00", "1974-10-26 16:00:00", "1975-03-01 16:00:00", 
"1975-10-25 16:00:00", "1976-03-06 16:00:00", "1976-10-30 16:00:00", 
"1977-03-05 16:00:00", "1977-10-29 16:00:00", "1978-03-04 16:00:00", 
"1978-10-28 16:00:00", "1979-03-03 16:00:00", "1979-10-27 16:00:00", 
"1980-03-01 16:00:00", "1980-10-25 16:00:00", "1981-02-28 16:00:00", 
"1981-10-24 16:00:00", "1982-04-03 16:00:00", "1982-10-30 16:00:00", 
"1983-03-05 16:00:00", "1983-10-29 16:00:00", "1984-03-03 16:00:00", 
"1984-10-27 16:00:00", "1985-03-02 16:00:00", "1985-10-26 16:00:00", 
"1986-03-15 16:00:00", "1986-10-18 16:00:00", "1987-03-14 16:00:00", 
"1987-10-24 16:00:00", "1988-03-19 16:00:00", "1988-10-29 16:00:00", 
"1989-03-18 16:00:00", "1989-10-28 16:00:00", "1990-03-03 16:00:00", 
"1990-10-27 16:00:00", "1991-03-02 16:00:00", "1991-10-26 16:00:00", 
"1992-02-29 16:00:00", "1992-10-24 16:00:00", "1993-03-06 16:00:00", 
"1993-10-30 16:00:00", "1994-03-05 16:00:00", "1994-10-29 16:00:00", 
"1995-03-04 16:00:00", "1995-10-28 16:00:00", "1996-03-30 16:00:00", 
"1996-10-26 16:00:00", "1997-03-29 16:00:00", "1997-10-25 16:00:00", 
"1998-03-28 16:00:00", "1998-10-24 16:00:00", "1999-03-27 16:00:00", 
"1999-10-30 16:00:00", "2000-03-25 16:00:00", "2000-08-26 16:00:00", 
"2001-03-24 16:00:00", "2001-10-27 16:00:00", "2002-03-30 16:00:00", 
"2002-10-26 16:00:00", "2003-03-29 16:00:00", "2003-10-25 16:00:00", 
"2004-03-27 16:00:00", "2004-10-30 16:00:00", "2005-03-26 16:00:00", 
"2005-10-29 16:00:00", "2006-03-25 16:00:00", "2006-10-28 16:00:00", 
"2007-03-24 16:00:00", "2007-10-27 16:00:00", "2008-03-29 16:00:00", 
"2008-10-25 16:00:00", "2009-03-28 16:00:00", "2009-10-24 16:00:00", 
"2010-03-27 16:00:00", "2010-10-30 16:00:00", "2011-03-26 16:00:00", 
"2011-10-29 16:00:00", "2012-03-24 16:00:00", "2012-10-27 16:00:00", 
"2013-03-30 16:00:00", "2013-10-26 16:00:00", "2014-03-29 16:00:00", 
"2014-10-25 16:00:00", "2015-03-28 16:00:00", "2015-10-24 16:00:00", 
"2016-03-26 16:00:00", "2016-10-29 16:00:00", "2017-03-25 16:00:00", 
"2017-10-28 16:00:00", "2018-03-24 16:00:00", "2018-10-27 16:00:00", 
"2019-03-30 16:00:00", "2019-10-26 16:00:00", "2020-03-28 16:00:00", 
"2020-10-24 16:00:00", "2021-03-27 16:00:00", "2021-10-30 16:00:00", 
"2022-03-26 16:00:00", "2022-10-29 16:00:00", "2023-03-25 16:00:00", 
"2023-10-28 16:00:00", "2024-03-30 16:00:00", "2024-10-26 16:00:00", 
"2025-03-29 16:00:00", "2025-10-25 16:00:00", "2026-03-28 16:00:00", 
"2026-10-24 16:00:00", "2027-03-27 16:00:00", "2027-10-30 16:00:00", 
"2028-03-25 16:00:00", "2028-10-28 16:00:00", "2029-03-24 16:00:00", 
"2029-10-27 16:00:00", "2030-03-30 16:00:00", "2030-10-26 16:00:00"
), class = "factor"), offSet = c(39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 
36000, 39600, 36000, 39600, 36000, 39600, 36000, 39600, 36000, 
39600, 36000, 39600, 36000, 39600, 36000, 39600)), .Names = c("Sydney", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128"), class = "data.frame") }


# EUROPE -----------------------------------------------------------------------


"Amsterdam" <- function() {
structure(list(Amsterdam = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 
153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 
166)), .Label = c("1916-04-30 23:40:28", "1916-09-30 22:40:28", 
"1917-04-16 01:40:28", "1917-09-17 01:40:28", "1918-04-01 01:40:28", 
"1918-09-30 01:40:28", "1919-04-07 01:40:28", "1919-09-29 01:40:28", 
"1920-04-05 01:40:28", "1920-09-27 01:40:28", "1921-04-04 01:40:28", 
"1921-09-26 01:40:28", "1922-03-26 01:40:28", "1922-10-08 01:40:28", 
"1923-06-01 01:40:28", "1923-10-07 01:40:28", "1924-03-30 01:40:28", 
"1924-10-05 01:40:28", "1925-06-05 01:40:28", "1925-10-04 01:40:28", 
"1926-05-15 01:40:28", "1926-10-03 01:40:28", "1927-05-15 01:40:28", 
"1927-10-02 01:40:28", "1928-05-15 01:40:28", "1928-10-07 01:40:28", 
"1929-05-15 01:40:28", "1929-10-06 01:40:28", "1930-05-15 01:40:28", 
"1930-10-05 01:40:28", "1931-05-15 01:40:28", "1931-10-04 01:40:28", 
"1932-05-22 01:40:28", "1932-10-02 01:40:28", "1933-05-15 01:40:28", 
"1933-10-08 01:40:28", "1934-05-15 01:40:28", "1934-10-07 01:40:28", 
"1935-05-15 01:40:28", "1935-10-06 01:40:28", "1936-05-15 01:40:28", 
"1936-10-04 01:40:28", "1937-05-22 01:40:28", "1937-06-30 22:40:28", 
"1937-10-03 01:40:00", "1938-05-15 01:40:00", "1938-10-02 01:40:00", 
"1939-05-15 01:40:00", "1939-10-08 01:40:00", "1940-05-16 23:40:00", 
"1942-11-02 01:00:00", "1943-03-29 01:00:00", "1943-10-04 01:00:00", 
"1944-04-03 01:00:00", "1944-10-02 01:00:00", "1945-04-02 01:00:00", 
"1945-09-16 01:00:00", "1976-12-31 23:00:00", "1977-04-03 01:00:00", 
"1977-09-25 01:00:00", "1978-04-02 01:00:00", "1978-10-01 01:00:00", 
"1979-04-01 01:00:00", "1979-09-30 01:00:00", "1980-04-06 01:00:00", 
"1980-09-28 01:00:00", "1981-03-29 01:00:00", "1981-09-27 01:00:00", 
"1982-03-28 01:00:00", "1982-09-26 01:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(430320, 70320, 430320, 70320, 430320, 70320, 430320, 
70320, 430320, 70320, 430320, 70320, 430320, 70320, 430320, 
70320, 430320, 70320, 430320, 70320, 430320, 70320, 430320, 
70320, 430320, 70320, 430320, 70320, 430320, 70320, 430320, 
70320, 430320, 70320, 430320, 70320, 430320, 70320, 430320, 
70320, 430320, 70320, 430320, 4800, 1200, 4800, 1200, 4800, 
1200, 3600, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600)), .Names = c("Amsterdam", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150", "151", 
"152", "153", "154", "155", "156", "157", "158", "159", "160", 
"161", "162", "163", "164", "165", "166"), class = "data.frame") }


"Andorra" <- function() {
structure(list(Andorra = structure(as.integer(c(NA, 1, 2, 3, 
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 
69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 
85, 86, 87, 88, 89, 90, 91, 92)), .Label = c("1985-03-31 01:00:00", 
"1985-09-29 01:00:00", "1986-03-30 01:00:00", "1986-09-28 01:00:00", 
"1987-03-29 01:00:00", "1987-09-27 01:00:00", "1988-03-27 01:00:00", 
"1988-09-25 01:00:00", "1989-03-26 01:00:00", "1989-09-24 01:00:00", 
"1990-03-25 01:00:00", "1990-09-30 01:00:00", "1991-03-31 01:00:00", 
"1991-09-29 01:00:00", "1992-03-29 01:00:00", "1992-09-27 01:00:00", 
"1993-03-28 01:00:00", "1993-09-26 01:00:00", "1994-03-27 01:00:00", 
"1994-09-25 01:00:00", "1995-03-26 01:00:00", "1995-09-24 01:00:00", 
"1996-03-31 01:00:00", "1996-10-27 01:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600)), .Names = c("Andorra", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93"), class = "data.frame") }


"Athens" <- function() {
structure(list(Athens = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, NA, NA, NA, NA, NA, 14, 15, 16, 17, 
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 
66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 
82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 
111, 112, 113, 114, 115, 116, 117, 118, 119)), .Label = c("1916-07-27 22:26:08", 
"1932-07-06 22:00:00", "1932-08-31 21:00:00", "1941-04-06 22:00:00", 
"1941-04-29 21:00:00", "1942-11-02 02:00:00", "1943-03-29 23:00:00", 
"1943-10-03 22:00:00", "1944-04-03 23:00:00", "1952-06-30 22:00:00", 
"1952-11-01 21:00:00", "1975-04-11 22:00:00", "1975-11-25 22:00:00", 
"1978-09-24 01:00:00", "1979-04-01 07:00:00", "1979-09-28 23:00:00", 
"1980-03-31 22:00:00", "1980-09-27 21:00:00", "1980-12-31 22:00:00", 
"1981-03-29 01:00:00", "1981-09-27 01:00:00", "1982-03-28 01:00:00", 
"1982-09-26 01:00:00", "1983-03-27 01:00:00", "1983-09-25 01:00:00", 
"1984-03-25 01:00:00", "1984-09-30 01:00:00", "1985-03-31 01:00:00", 
"1985-09-29 01:00:00", "1986-03-30 01:00:00", "1986-09-28 01:00:00", 
"1987-03-29 01:00:00", "1987-09-27 01:00:00", "1988-03-27 01:00:00", 
"1988-09-25 01:00:00", "1989-03-26 01:00:00", "1989-09-24 01:00:00", 
"1990-03-25 01:00:00", "1990-09-30 01:00:00", "1991-03-31 01:00:00", 
"1991-09-29 01:00:00", "1992-03-29 01:00:00", "1992-09-27 01:00:00", 
"1993-03-28 01:00:00", "1993-09-26 01:00:00", "1994-03-27 01:00:00", 
"1994-09-25 01:00:00", "1995-03-26 01:00:00", "1995-09-24 01:00:00", 
"1996-03-31 01:00:00", "1996-10-27 01:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(7200, 10800, 
7200, 10800, 3600, 3600, 7200, 3600, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200)), .Names = c("Athens", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124"), class = "data.frame") }


"Belfast" <- function() {
structure(list(Belfast = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 
141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 
154, 155, 156, 157, NA, 158, 159, 160, 161, 162, 163, 164, 165, 
166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 
179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 
205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 
218, 219, 220, 221, 222, 223, 224, 225, 226, 227)), .Label = c("1916-05-21 02:25:21", 
"1916-10-01 02:25:21", "1917-04-08 02:00:00", "1917-09-17 02:00:00", 
"1918-03-24 02:00:00", "1918-09-30 02:00:00", "1919-03-30 02:00:00", 
"1919-09-29 02:00:00", "1920-03-28 02:00:00", "1920-10-25 02:00:00", 
"1921-04-03 02:00:00", "1921-10-03 02:00:00", "1922-03-26 02:00:00", 
"1922-10-08 02:00:00", "1923-04-22 02:00:00", "1923-09-16 02:00:00", 
"1924-04-13 02:00:00", "1924-09-21 02:00:00", "1925-04-19 02:00:00", 
"1925-10-04 02:00:00", "1926-04-18 02:00:00", "1926-10-03 02:00:00", 
"1927-04-10 02:00:00", "1927-10-02 02:00:00", "1928-04-22 02:00:00", 
"1928-10-07 02:00:00", "1929-04-21 02:00:00", "1929-10-06 02:00:00", 
"1930-04-13 02:00:00", "1930-10-05 02:00:00", "1931-04-19 02:00:00", 
"1931-10-04 02:00:00", "1932-04-17 02:00:00", "1932-10-02 02:00:00", 
"1933-04-09 02:00:00", "1933-10-08 02:00:00", "1934-04-22 02:00:00", 
"1934-10-07 02:00:00", "1935-04-14 02:00:00", "1935-10-06 02:00:00", 
"1936-04-19 02:00:00", "1936-10-04 02:00:00", "1937-04-18 02:00:00", 
"1937-10-03 02:00:00", "1938-04-10 02:00:00", "1938-10-02 02:00:00", 
"1939-04-16 02:00:00", "1939-11-19 02:00:00", "1940-02-25 02:00:00", 
"1941-05-04 01:00:00", "1941-08-10 01:00:00", "1942-04-05 01:00:00", 
"1942-08-09 01:00:00", "1943-04-04 01:00:00", "1943-08-15 01:00:00", 
"1944-04-02 01:00:00", "1944-09-17 01:00:00", "1945-04-02 01:00:00", 
"1945-07-15 01:00:00", "1945-10-07 02:00:00", "1946-04-14 02:00:00", 
"1946-10-06 02:00:00", "1947-03-16 02:00:00", "1947-04-13 01:00:00", 
"1947-08-10 01:00:00", "1947-11-02 02:00:00", "1948-03-14 02:00:00", 
"1948-10-31 02:00:00", "1949-04-03 02:00:00", "1949-10-30 02:00:00", 
"1950-04-16 02:00:00", "1950-10-22 02:00:00", "1951-04-15 02:00:00", 
"1951-10-21 02:00:00", "1952-04-20 02:00:00", "1952-10-26 02:00:00", 
"1953-04-19 02:00:00", "1953-10-04 02:00:00", "1954-04-11 02:00:00", 
"1954-10-03 02:00:00", "1955-04-17 02:00:00", "1955-10-02 02:00:00", 
"1956-04-22 02:00:00", "1956-10-07 02:00:00", "1957-04-14 02:00:00", 
"1957-10-06 02:00:00", "1958-04-20 02:00:00", "1958-10-05 02:00:00", 
"1959-04-19 02:00:00", "1959-10-04 02:00:00", "1960-04-10 02:00:00", 
"1960-10-02 02:00:00", "1961-03-26 02:00:00", "1961-10-29 02:00:00", 
"1962-03-25 02:00:00", "1962-10-28 02:00:00", "1963-03-31 02:00:00", 
"1963-10-27 02:00:00", "1964-03-22 02:00:00", "1964-10-25 02:00:00", 
"1965-03-21 02:00:00", "1965-10-24 02:00:00", "1966-03-20 02:00:00", 
"1966-10-23 02:00:00", "1967-03-19 02:00:00", "1967-10-29 02:00:00", 
"1968-02-18 02:00:00", "1968-10-26 23:00:00", "1971-10-31 02:00:00", 
"1972-03-19 02:00:00", "1972-10-29 02:00:00", "1973-03-18 02:00:00", 
"1973-10-28 02:00:00", "1974-03-17 02:00:00", "1974-10-27 02:00:00", 
"1975-03-16 02:00:00", "1975-10-26 02:00:00", "1976-03-21 02:00:00", 
"1976-10-24 02:00:00", "1977-03-20 02:00:00", "1977-10-23 02:00:00", 
"1978-03-19 02:00:00", "1978-10-29 02:00:00", "1979-03-18 02:00:00", 
"1979-10-28 02:00:00", "1980-03-16 02:00:00", "1980-10-26 02:00:00", 
"1981-03-29 01:00:00", "1981-10-25 01:00:00", "1982-03-28 01:00:00", 
"1982-10-24 01:00:00", "1983-03-27 01:00:00", "1983-10-23 01:00:00", 
"1984-03-25 01:00:00", "1984-10-28 01:00:00", "1985-03-31 01:00:00", 
"1985-10-27 01:00:00", "1986-03-30 01:00:00", "1986-10-26 01:00:00", 
"1987-03-29 01:00:00", "1987-10-25 01:00:00", "1988-03-27 01:00:00", 
"1988-10-23 01:00:00", "1989-03-26 01:00:00", "1989-10-29 01:00:00", 
"1990-03-25 01:00:00", "1990-10-28 01:00:00", "1991-03-31 01:00:00", 
"1991-10-27 01:00:00", "1992-03-29 01:00:00", "1992-10-25 01:00:00", 
"1993-03-28 01:00:00", "1993-10-24 01:00:00", "1994-03-27 01:00:00", 
"1994-10-23 01:00:00", "1995-03-26 01:00:00", "1995-10-22 01:00:00", 
"1996-03-31 01:00:00", "1996-10-27 01:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(124740, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 0, 3600, 0, 3600, 7200, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0)), .Names = c("Belfast", "offSet"
), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", 
"43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", 
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", 
"65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", 
"76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", 
"87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", 
"98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150", "151", 
"152", "153", "154", "155", "156", "157", "158", "159", "160", 
"161", "162", "163", "164", "165", "166", "167", "168", "169", 
"170", "171", "172", "173", "174", "175", "176", "177", "178", 
"179", "180", "181", "182", "183", "184", "185", "186", "187", 
"188", "189", "190", "191", "192", "193", "194", "195", "196", 
"197", "198", "199", "200", "201", "202", "203", "204", "205", 
"206", "207", "208", "209", "210", "211", "212", "213", "214", 
"215", "216", "217", "218", "219", "220", "221", "222", "223", 
"224", "225", "226", "227", "228"), class = "data.frame") }


"Belgrade" <- function() {
structure(list(Belgrade = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105)), .Label = c("1941-04-18 22:00:00", 
"1942-11-02 01:00:00", "1943-03-29 01:00:00", "1943-10-04 01:00:00", 
"1944-04-03 01:00:00", "1944-10-02 01:00:00", "1945-05-08 01:00:00", 
"1945-09-16 01:00:00", "1982-11-26 23:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(3600, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600)), .Names = c("Belgrade", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105"), 
class = "data.frame") }


"Berlin" <- "Frankfurt" <- function() {
structure(list(Berlin = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, NA, 15, 16, 17, 18, 19, NA, 20, 
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 
69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127)), .Label = c("1916-04-30 22:00:00", "1916-09-30 23:00:00", 
"1917-04-16 01:00:00", "1917-09-17 01:00:00", "1918-04-15 01:00:00", 
"1918-09-16 01:00:00", "1940-04-01 01:00:00", "1942-11-02 01:00:00", 
"1943-03-29 01:00:00", "1943-10-04 01:00:00", "1944-04-03 01:00:00", 
"1944-10-02 01:00:00", "1945-04-02 01:00:00", "1945-05-31 01:00:00", 
"1945-11-18 01:00:00", "1946-04-14 01:00:00", "1946-10-07 01:00:00", 
"1947-04-06 01:00:00", "1947-05-11 01:00:00", "1947-10-05 01:00:00", 
"1948-04-18 01:00:00", "1948-10-03 01:00:00", "1949-04-10 01:00:00", 
"1949-10-02 01:00:00", "1979-12-31 23:00:00", "1980-04-06 01:00:00", 
"1980-09-28 01:00:00", "1981-03-29 01:00:00", "1981-09-27 01:00:00", 
"1982-03-28 01:00:00", "1982-09-26 01:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 10800, 7200, 3600, 7200, 3600, 
7200, 10800, 7200, 3600, 7200, 3600, 7200, 3600, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600)), .Names = c("Berlin", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128", "129"), class = "data.frame") }


"Bratislava" <- function() {
structure(list(Bratislava = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128)), .Label = c("1891-09-30 23:02:16", "1916-04-30 22:00:00", 
"1916-09-30 23:00:00", "1917-04-16 01:00:00", "1917-09-17 01:00:00", 
"1918-04-15 01:00:00", "1918-09-16 01:00:00", "1940-04-01 01:00:00", 
"1942-11-02 01:00:00", "1943-03-29 01:00:00", "1943-10-04 01:00:00", 
"1944-04-03 01:00:00", "1944-09-17 01:00:00", "1945-04-08 01:00:00", 
"1945-11-18 01:00:00", "1946-05-06 01:00:00", "1946-10-06 01:00:00", 
"1947-04-20 01:00:00", "1947-10-05 01:00:00", "1948-04-18 01:00:00", 
"1948-10-03 01:00:00", "1949-04-09 01:00:00", "1949-10-02 01:00:00", 
"1978-12-31 23:00:00", "1979-04-01 01:00:00", "1979-09-30 01:00:00", 
"1980-04-06 01:00:00", "1980-09-28 01:00:00", "1981-03-29 01:00:00", 
"1981-09-27 01:00:00", "1982-03-28 01:00:00", "1982-09-26 01:00:00", 
"1983-03-27 01:00:00", "1983-09-25 01:00:00", "1984-03-25 01:00:00", 
"1984-09-30 01:00:00", "1985-03-31 01:00:00", "1985-09-29 01:00:00", 
"1986-03-30 01:00:00", "1986-09-28 01:00:00", "1987-03-29 01:00:00", 
"1987-09-27 01:00:00", "1988-03-27 01:00:00", "1988-09-25 01:00:00", 
"1989-03-26 01:00:00", "1989-09-24 01:00:00", "1990-03-25 01:00:00", 
"1990-09-30 01:00:00", "1991-03-31 01:00:00", "1991-09-29 01:00:00", 
"1992-03-29 01:00:00", "1992-09-27 01:00:00", "1993-03-28 01:00:00", 
"1993-09-26 01:00:00", "1994-03-27 01:00:00", "1994-09-25 01:00:00", 
"1995-03-26 01:00:00", "1995-09-24 01:00:00", "1996-03-31 01:00:00", 
"1996-10-27 01:00:00", "1997-03-30 01:00:00", "1997-10-26 01:00:00", 
"1998-03-29 01:00:00", "1998-10-25 01:00:00", "1999-03-28 01:00:00", 
"1999-10-31 01:00:00", "2000-03-26 01:00:00", "2000-10-29 01:00:00", 
"2001-03-25 01:00:00", "2001-10-28 01:00:00", "2002-03-31 01:00:00", 
"2002-10-27 01:00:00", "2003-03-30 01:00:00", "2003-10-26 01:00:00", 
"2004-03-28 01:00:00", "2004-10-31 01:00:00", "2005-03-27 01:00:00", 
"2005-10-30 01:00:00", "2006-03-26 01:00:00", "2006-10-29 01:00:00", 
"2007-03-25 01:00:00", "2007-10-28 01:00:00", "2008-03-30 01:00:00", 
"2008-10-26 01:00:00", "2009-03-29 01:00:00", "2009-10-25 01:00:00", 
"2010-03-28 01:00:00", "2010-10-31 01:00:00", "2011-03-27 01:00:00", 
"2011-10-30 01:00:00", "2012-03-25 01:00:00", "2012-10-28 01:00:00", 
"2013-03-31 01:00:00", "2013-10-27 01:00:00", "2014-03-30 01:00:00", 
"2014-10-26 01:00:00", "2015-03-29 01:00:00", "2015-10-25 01:00:00", 
"2016-03-27 01:00:00", "2016-10-30 01:00:00", "2017-03-26 01:00:00", 
"2017-10-29 01:00:00", "2018-03-25 01:00:00", "2018-10-28 01:00:00", 
"2019-03-31 01:00:00", "2019-10-27 01:00:00", "2020-03-29 01:00:00", 
"2020-10-25 01:00:00", "2021-03-28 01:00:00", "2021-10-31 01:00:00", 
"2022-03-27 01:00:00", "2022-10-30 01:00:00", "2023-03-26 01:00:00", 
"2023-10-29 01:00:00", "2024-03-31 01:00:00", "2024-10-27 01:00:00", 
"2025-03-30 01:00:00", "2025-10-26 01:00:00", "2026-03-29 01:00:00", 
"2026-10-25 01:00:00", "2027-03-28 01:00:00", "2027-10-31 01:00:00", 
"2028-03-26 01:00:00", "2028-10-29 01:00:00", "2029-03-25 01:00:00", 
"2029-10-28 01:00:00", "2030-03-31 01:00:00", "2030-10-27 01:00:00"
), class = "factor"), offSet = c(3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600)), .Names = c("Bratislava", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128"), class = "data.frame") }


"Brussels" <- function() {
structure(list(Brussels = structure(as.integer(c(1, NA, 2, NA, 
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 
84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 
126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 
139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 
152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 
165, 166, 167, 168, 169, 170)), .Label = c("1892-05-01 11:42:30", 
"1916-04-30 23:00:00", "1917-04-16 01:00:00", "1917-09-17 01:00:00", 
"1918-04-15 01:00:00", "1918-09-16 01:00:00", "1918-11-11 11:00:00", 
"1919-03-01 23:00:00", "1919-10-04 23:00:00", "1920-02-14 23:00:00", 
"1920-10-23 23:00:00", "1921-03-14 23:00:00", "1921-10-25 23:00:00", 
"1922-03-25 23:00:00", "1922-10-07 23:00:00", "1923-04-21 23:00:00", 
"1923-10-06 23:00:00", "1924-03-29 23:00:00", "1924-10-04 23:00:00", 
"1925-04-04 23:00:00", "1925-10-03 23:00:00", "1926-04-17 23:00:00", 
"1926-10-02 23:00:00", "1927-04-09 23:00:00", "1927-10-01 23:00:00", 
"1928-04-14 23:00:00", "1928-10-07 02:00:00", "1929-04-21 02:00:00", 
"1929-10-06 02:00:00", "1930-04-13 02:00:00", "1930-10-05 02:00:00", 
"1931-04-19 02:00:00", "1931-10-04 02:00:00", "1932-04-03 02:00:00", 
"1932-10-02 02:00:00", "1933-03-26 02:00:00", "1933-10-08 02:00:00", 
"1934-04-08 02:00:00", "1934-10-07 02:00:00", "1935-03-31 02:00:00", 
"1935-10-06 02:00:00", "1936-04-19 02:00:00", "1936-10-04 02:00:00", 
"1937-04-04 02:00:00", "1937-10-03 02:00:00", "1938-03-27 02:00:00", 
"1938-10-02 02:00:00", "1939-04-16 02:00:00", "1939-11-19 02:00:00", 
"1940-02-25 02:00:00", "1940-05-20 02:00:00", "1942-11-02 01:00:00", 
"1943-03-29 01:00:00", "1943-10-04 01:00:00", "1944-04-03 01:00:00", 
"1944-09-02 22:00:00", "1944-09-17 01:00:00", "1945-04-02 01:00:00", 
"1945-09-16 01:00:00", "1946-05-19 01:00:00", "1946-10-07 01:00:00", 
"1976-12-31 23:00:00", "1977-04-03 01:00:00", "1977-09-25 01:00:00", 
"1978-04-02 01:00:00", "1978-10-01 01:00:00", "1979-04-01 01:00:00", 
"1979-09-30 01:00:00", "1980-04-06 01:00:00", "1980-09-28 01:00:00", 
"1981-03-29 01:00:00", "1981-09-27 01:00:00", "1982-03-28 01:00:00", 
"1982-09-26 01:00:00", "1983-03-27 01:00:00", "1983-09-25 01:00:00", 
"1984-03-25 01:00:00", "1984-09-30 01:00:00", "1985-03-31 01:00:00", 
"1985-09-29 01:00:00", "1986-03-30 01:00:00", "1986-09-28 01:00:00", 
"1987-03-29 01:00:00", "1987-09-27 01:00:00", "1988-03-27 01:00:00", 
"1988-09-25 01:00:00", "1989-03-26 01:00:00", "1989-09-24 01:00:00", 
"1990-03-25 01:00:00", "1990-09-30 01:00:00", "1991-03-31 01:00:00", 
"1991-09-29 01:00:00", "1992-03-29 01:00:00", "1992-09-27 01:00:00", 
"1993-03-28 01:00:00", "1993-09-26 01:00:00", "1994-03-27 01:00:00", 
"1994-09-25 01:00:00", "1995-03-26 01:00:00", "1995-09-24 01:00:00", 
"1996-03-31 01:00:00", "1996-10-27 01:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(0, 3600, 
3600, 3600, 7200, 3600, 7200, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 3600, 3600, 7200, 
3600, 7200, 3600, 3600, 7200, 3600, 7200, 3600, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600)), .Names = c("Brussels", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150", "151", 
"152", "153", "154", "155", "156", "157", "158", "159", "160", 
"161", "162", "163", "164", "165", "166", "167", "168", "169", 
"170", "171", "172"), class = "data.frame") }


"Bucharest" <- function() {
structure(list(Bucharest = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 
66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 
82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 
98, 99, 100, 101, 102, 103, 104)), .Label = c("1931-07-23 22:15:36", 
"1932-05-20 22:00:00", "1932-10-01 22:00:00", "1933-04-01 22:00:00", 
"1933-09-30 22:00:00", "1934-04-07 22:00:00", "1934-10-06 22:00:00", 
"1935-04-06 22:00:00", "1935-10-05 22:00:00", "1936-04-04 22:00:00", 
"1936-10-03 22:00:00", "1937-04-03 22:00:00", "1937-10-02 22:00:00", 
"1938-04-02 22:00:00", "1938-10-01 22:00:00", "1939-04-01 22:00:00", 
"1939-09-30 22:00:00", "1979-05-26 22:00:00", "1979-09-29 21:00:00", 
"1980-04-05 21:00:00", "1980-09-27 22:00:00", "1990-12-31 22:00:00", 
"1991-03-30 22:00:00", "1991-09-28 22:00:00", "1992-03-28 22:00:00", 
"1992-09-26 22:00:00", "1993-03-27 22:00:00", "1993-09-25 22:00:00", 
"1993-12-31 22:00:00", "1994-03-26 22:00:00", "1994-09-24 21:00:00", 
"1995-03-25 22:00:00", "1995-09-23 21:00:00", "1996-03-30 22:00:00", 
"1996-10-26 21:00:00", "1996-12-31 22:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200)), .Names = c("Bucharest", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124"), class = "data.frame") }


"Budapest" <- function() {
structure(list(Budapest = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, NA, 36, 
NA, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 
84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 
126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137)), 
.Label = c("1916-04-30 22:00:00", 
"1916-09-30 23:00:00", "1917-04-16 01:00:00", "1917-09-17 01:00:00", 
"1917-12-31 23:00:00", "1918-04-01 02:00:00", "1918-09-29 01:00:00", 
"1919-04-15 02:00:00", "1919-09-15 01:00:00", "1920-04-05 02:00:00", 
"1920-09-30 01:00:00", "1941-04-06 01:00:00", "1942-11-02 01:00:00", 
"1943-03-29 01:00:00", "1943-10-04 01:00:00", "1944-04-03 01:00:00", 
"1944-10-02 01:00:00", "1945-05-01 22:00:00", "1945-11-02 22:00:00", 
"1946-03-31 01:00:00", "1946-10-06 01:00:00", "1947-04-06 01:00:00", 
"1947-10-05 01:00:00", "1948-04-04 01:00:00", "1948-10-03 01:00:00", 
"1949-04-10 01:00:00", "1949-10-02 01:00:00", "1950-04-17 01:00:00", 
"1950-10-23 01:00:00", "1954-05-22 23:00:00", "1954-10-02 22:00:00", 
"1955-05-22 23:00:00", "1955-10-02 22:00:00", "1956-06-02 23:00:00", 
"1956-09-29 22:00:00", "1957-09-29 01:00:00", "1980-09-28 01:00:00", 
"1981-03-29 01:00:00", "1981-09-27 01:00:00", "1982-03-28 01:00:00", 
"1982-09-26 01:00:00", "1983-03-27 01:00:00", "1983-09-25 01:00:00", 
"1984-03-25 01:00:00", "1984-09-30 01:00:00", "1985-03-31 01:00:00", 
"1985-09-29 01:00:00", "1986-03-30 01:00:00", "1986-09-28 01:00:00", 
"1987-03-29 01:00:00", "1987-09-27 01:00:00", "1988-03-27 01:00:00", 
"1988-09-25 01:00:00", "1989-03-26 01:00:00", "1989-09-24 01:00:00", 
"1990-03-25 01:00:00", "1990-09-30 01:00:00", "1991-03-31 01:00:00", 
"1991-09-29 01:00:00", "1992-03-29 01:00:00", "1992-09-27 01:00:00", 
"1993-03-28 01:00:00", "1993-09-26 01:00:00", "1994-03-27 01:00:00", 
"1994-09-25 01:00:00", "1995-03-26 01:00:00", "1995-09-24 01:00:00", 
"1996-03-31 01:00:00", "1996-10-27 01:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(7200, 3600, 
7200, 3600, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 3600, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600)), .Names = c("Budapest", "offSet"
), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", 
"43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", 
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", 
"65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", 
"76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", 
"87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", 
"98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139"), class = "data.frame") }


"Copenhagen" <- function() {
structure(list(Copenhagen = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120)), .Label = c("1894-03-31 23:09:40", 
"1916-05-14 22:00:00", "1916-09-30 21:00:00", "1940-05-14 23:00:00", 
"1942-11-02 01:00:00", "1943-03-29 01:00:00", "1943-10-04 01:00:00", 
"1944-04-03 01:00:00", "1944-10-02 01:00:00", "1945-04-02 01:00:00", 
"1945-08-15 01:00:00", "1946-05-01 01:00:00", "1946-09-01 01:00:00", 
"1947-05-04 01:00:00", "1947-08-10 01:00:00", "1948-05-09 01:00:00", 
"1948-08-08 01:00:00", "1979-12-31 23:00:00", "1980-04-06 01:00:00", 
"1980-09-28 01:00:00", "1981-03-29 01:00:00", "1981-09-27 01:00:00", 
"1982-03-28 01:00:00", "1982-09-26 01:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600)), .Names = c("Copenhagen", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120"), class = "data.frame") }


"Dublin" <- function() {
structure(list(Dublin = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, NA, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 
140, 141, 142, 143, NA, 144, 145, 146, 147, 148, 149, 150, 151, 
152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 
165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 
178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 
191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 
204, 205, 206, 207, 208, 209, 210, 211, 212, 213)), 
.Label = c("1916-05-21 02:25:21", 
"1916-10-01 02:25:21", "1917-04-08 02:00:00", "1917-09-17 02:00:00", 
"1918-03-24 02:00:00", "1918-09-30 02:00:00", "1919-03-30 02:00:00", 
"1919-09-29 02:00:00", "1920-03-28 02:00:00", "1920-10-25 02:00:00", 
"1921-04-03 02:00:00", "1921-10-03 02:00:00", "1922-03-26 02:00:00", 
"1922-10-08 02:00:00", "1923-04-22 02:00:00", "1923-09-16 02:00:00", 
"1924-04-13 02:00:00", "1924-09-21 02:00:00", "1925-04-19 02:00:00", 
"1925-10-04 02:00:00", "1926-04-18 02:00:00", "1926-10-03 02:00:00", 
"1927-04-10 02:00:00", "1927-10-02 02:00:00", "1928-04-22 02:00:00", 
"1928-10-07 02:00:00", "1929-04-21 02:00:00", "1929-10-06 02:00:00", 
"1930-04-13 02:00:00", "1930-10-05 02:00:00", "1931-04-19 02:00:00", 
"1931-10-04 02:00:00", "1932-04-17 02:00:00", "1932-10-02 02:00:00", 
"1933-04-09 02:00:00", "1933-10-08 02:00:00", "1934-04-22 02:00:00", 
"1934-10-07 02:00:00", "1935-04-14 02:00:00", "1935-10-06 02:00:00", 
"1936-04-19 02:00:00", "1936-10-04 02:00:00", "1937-04-18 02:00:00", 
"1937-10-03 02:00:00", "1938-04-10 02:00:00", "1938-10-02 02:00:00", 
"1939-04-16 02:00:00", "1939-11-19 02:00:00", "1940-02-25 02:00:00", 
"1946-10-06 01:00:00", "1947-03-16 02:00:00", "1947-11-02 01:00:00", 
"1948-04-18 02:00:00", "1948-10-31 02:00:00", "1949-04-03 02:00:00", 
"1949-10-30 02:00:00", "1950-04-16 02:00:00", "1950-10-22 02:00:00", 
"1951-04-15 02:00:00", "1951-10-21 02:00:00", "1952-04-20 02:00:00", 
"1952-10-26 02:00:00", "1953-04-19 02:00:00", "1953-10-04 02:00:00", 
"1954-04-11 02:00:00", "1954-10-03 02:00:00", "1955-04-17 02:00:00", 
"1955-10-02 02:00:00", "1956-04-22 02:00:00", "1956-10-07 02:00:00", 
"1957-04-14 02:00:00", "1957-10-06 02:00:00", "1958-04-20 02:00:00", 
"1958-10-05 02:00:00", "1959-04-19 02:00:00", "1959-10-04 02:00:00", 
"1960-04-10 02:00:00", "1960-10-02 02:00:00", "1961-03-26 02:00:00", 
"1961-10-29 02:00:00", "1962-03-25 02:00:00", "1962-10-28 02:00:00", 
"1963-03-31 02:00:00", "1963-10-27 02:00:00", "1964-03-22 02:00:00", 
"1964-10-25 02:00:00", "1965-03-21 02:00:00", "1965-10-24 02:00:00", 
"1966-03-20 02:00:00", "1966-10-23 02:00:00", "1967-03-19 02:00:00", 
"1967-10-29 02:00:00", "1968-02-18 02:00:00", "1968-10-26 23:00:00", 
"1971-10-31 02:00:00", "1972-03-19 02:00:00", "1972-10-29 02:00:00", 
"1973-03-18 02:00:00", "1973-10-28 02:00:00", "1974-03-17 02:00:00", 
"1974-10-27 02:00:00", "1975-03-16 02:00:00", "1975-10-26 02:00:00", 
"1976-03-21 02:00:00", "1976-10-24 02:00:00", "1977-03-20 02:00:00", 
"1977-10-23 02:00:00", "1978-03-19 02:00:00", "1978-10-29 02:00:00", 
"1979-03-18 02:00:00", "1979-10-28 02:00:00", "1980-03-16 02:00:00", 
"1980-10-26 02:00:00", "1981-03-29 01:00:00", "1981-10-25 01:00:00", 
"1982-03-28 01:00:00", "1982-10-24 01:00:00", "1983-03-27 01:00:00", 
"1983-10-23 01:00:00", "1984-03-25 01:00:00", "1984-10-28 01:00:00", 
"1985-03-31 01:00:00", "1985-10-27 01:00:00", "1986-03-30 01:00:00", 
"1986-10-26 01:00:00", "1987-03-29 01:00:00", "1987-10-25 01:00:00", 
"1988-03-27 01:00:00", "1988-10-23 01:00:00", "1989-03-26 01:00:00", 
"1989-10-29 01:00:00", "1990-03-25 01:00:00", "1990-10-28 01:00:00", 
"1991-03-31 01:00:00", "1991-10-27 01:00:00", "1992-03-29 01:00:00", 
"1992-10-25 01:00:00", "1993-03-28 01:00:00", "1993-10-24 01:00:00", 
"1994-03-27 01:00:00", "1994-10-23 01:00:00", "1995-03-26 01:00:00", 
"1995-10-22 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(124740, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 0, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0)), .Names = c("Dublin", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150", "151", 
"152", "153", "154", "155", "156", "157", "158", "159", "160", 
"161", "162", "163", "164", "165", "166", "167", "168", "169", 
"170", "171", "172", "173", "174", "175", "176", "177", "178", 
"179", "180", "181", "182", "183", "184", "185", "186", "187", 
"188", "189", "190", "191", "192", "193", "194", "195", "196", 
"197", "198", "199", "200", "201", "202", "203", "204", "205", 
"206", "207", "208", "209", "210", "211", "212", "213", "214", 
"215"), class = "data.frame") }


"Helsinki" <- function() {
structure(list(Helsinki = structure(as.integer(c(1, 2, 3, NA, 
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 
69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103)), .Label = c("1921-04-30 22:20:08", "1942-04-02 22:00:00", 
"1942-10-02 21:00:00", "1981-03-29 01:00:00", "1981-09-27 01:00:00", 
"1982-03-28 01:00:00", "1982-09-26 01:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(7200, 10800, 7200, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200)), .Names = c("Helsinki", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104"), class = "data.frame") }


"Istanbul" <- function() {
structure(list(Istanbul = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, NA, NA, 45, 46, 47, 48, 49, 50, 51, 
52, 53, NA, 54, NA, 55, NA, 56, NA, 57, 58, 59, 60, 61, 62, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 
140, 141, 142, 143)), .Label = c("1910-09-30 22:03:04", "1916-04-30 22:00:00", 
"1916-09-30 21:00:00", "1920-03-27 22:00:00", "1920-10-24 21:00:00", 
"1921-04-02 22:00:00", "1921-10-02 21:00:00", "1922-03-25 22:00:00", 
"1922-10-07 21:00:00", "1924-05-12 22:00:00", "1924-09-30 21:00:00", 
"1925-04-30 22:00:00", "1925-09-30 21:00:00", "1940-06-29 22:00:00", 
"1940-10-04 21:00:00", "1940-11-30 22:00:00", "1941-09-20 21:00:00", 
"1942-03-31 22:00:00", "1942-10-31 21:00:00", "1945-04-01 22:00:00", 
"1945-10-07 21:00:00", "1946-05-31 22:00:00", "1946-09-30 21:00:00", 
"1947-04-19 22:00:00", "1947-10-04 21:00:00", "1948-04-17 22:00:00", 
"1948-10-02 21:00:00", "1949-04-09 22:00:00", "1949-10-01 21:00:00", 
"1950-04-18 22:00:00", "1950-10-07 21:00:00", "1951-04-21 22:00:00", 
"1951-10-07 21:00:00", "1962-07-14 22:00:00", "1962-10-07 21:00:00", 
"1964-05-14 22:00:00", "1964-09-30 21:00:00", "1970-05-02 22:00:00", 
"1970-10-03 21:00:00", "1971-05-01 22:00:00", "1971-10-02 21:00:00", 
"1972-05-06 22:00:00", "1972-10-07 21:00:00", "1973-06-02 23:00:00", 
"1974-11-03 02:00:00", "1975-03-29 22:00:00", "1975-10-25 21:00:00", 
"1976-05-31 22:00:00", "1976-10-30 21:00:00", "1977-04-02 22:00:00", 
"1977-10-15 21:00:00", "1978-04-01 22:00:00", "1978-10-14 21:00:00", 
"1979-10-14 20:00:00", "1980-10-12 20:00:00", "1981-10-11 20:00:00", 
"1982-10-10 20:00:00", "1983-07-30 21:00:00", "1983-10-01 20:00:00", 
"1985-04-19 21:00:00", "1985-09-27 21:00:00", "1985-12-31 22:00:00", 
"1990-12-31 22:00:00", "1991-03-31 01:00:00", "1991-09-29 01:00:00", 
"1992-03-29 01:00:00", "1992-09-27 01:00:00", "1993-03-28 01:00:00", 
"1993-09-26 01:00:00", "1994-03-27 01:00:00", "1994-09-25 01:00:00", 
"1995-03-26 01:00:00", "1995-09-24 01:00:00", "1996-03-31 01:00:00", 
"1996-10-27 01:00:00", "1997-03-30 01:00:00", "1997-10-26 01:00:00", 
"1998-03-29 01:00:00", "1998-10-25 01:00:00", "1999-03-28 01:00:00", 
"1999-10-31 01:00:00", "2000-03-26 01:00:00", "2000-10-29 01:00:00", 
"2001-03-25 01:00:00", "2001-10-28 01:00:00", "2002-03-31 01:00:00", 
"2002-10-27 01:00:00", "2003-03-30 01:00:00", "2003-10-26 01:00:00", 
"2004-03-28 01:00:00", "2004-10-31 01:00:00", "2005-03-27 01:00:00", 
"2005-10-30 01:00:00", "2006-03-26 01:00:00", "2006-10-29 01:00:00", 
"2007-03-25 01:00:00", "2007-10-28 01:00:00", "2008-03-30 01:00:00", 
"2008-10-26 01:00:00", "2009-03-29 01:00:00", "2009-10-25 01:00:00", 
"2010-03-28 01:00:00", "2010-10-31 01:00:00", "2011-03-27 01:00:00", 
"2011-10-30 01:00:00", "2012-03-25 01:00:00", "2012-10-28 01:00:00", 
"2013-03-31 01:00:00", "2013-10-27 01:00:00", "2014-03-30 01:00:00", 
"2014-10-26 01:00:00", "2015-03-29 01:00:00", "2015-10-25 01:00:00", 
"2016-03-27 01:00:00", "2016-10-30 01:00:00", "2017-03-26 01:00:00", 
"2017-10-29 01:00:00", "2018-03-25 01:00:00", "2018-10-28 01:00:00", 
"2019-03-31 01:00:00", "2019-10-27 01:00:00", "2020-03-29 01:00:00", 
"2020-10-25 01:00:00", "2021-03-28 01:00:00", "2021-10-31 01:00:00", 
"2022-03-27 01:00:00", "2022-10-30 01:00:00", "2023-03-26 01:00:00", 
"2023-10-29 01:00:00", "2024-03-31 01:00:00", "2024-10-27 01:00:00", 
"2025-03-30 01:00:00", "2025-10-26 01:00:00", "2026-03-29 01:00:00", 
"2026-10-25 01:00:00", "2027-03-28 01:00:00", "2027-10-31 01:00:00", 
"2028-03-26 01:00:00", "2028-10-29 01:00:00", "2029-03-25 01:00:00", 
"2029-10-28 01:00:00", "2030-03-31 01:00:00", "2030-10-27 01:00:00"
), class = "factor"), offSet = c(7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 10800, 
14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 
10800, 10800, 7200, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200)), .Names = c("Istanbul", "offSet"
), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", 
"43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", 
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", 
"65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", 
"76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", 
"87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", 
"98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150", "151", 
"152", "153", "154", "155", "156", "157", "158", "159"), class = "data.frame") }


"Kiev" <- function() {
structure(list(Kiev = structure(as.integer(c(1, 2, 3, 4, 5, 6, 
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107)), .Label = c("1924-05-01 21:57:56", 
"1930-06-20 22:00:00", "1941-09-19 21:00:00", "1942-11-02 01:00:00", 
"1943-03-29 01:00:00", "1943-10-04 01:00:00", "1943-11-05 23:00:00", 
"1981-03-31 21:00:00", "1981-09-30 20:00:00", "1982-03-31 21:00:00", 
"1982-09-30 20:00:00", "1983-03-31 21:00:00", "1983-09-30 20:00:00", 
"1984-03-31 21:00:00", "1984-09-29 23:00:00", "1985-03-30 23:00:00", 
"1985-09-28 23:00:00", "1986-03-29 23:00:00", "1986-09-27 23:00:00", 
"1987-03-28 23:00:00", "1987-09-26 23:00:00", "1988-03-26 23:00:00", 
"1988-09-24 23:00:00", "1989-03-25 23:00:00", "1989-09-23 23:00:00", 
"1989-12-31 21:00:00", "1990-06-30 23:00:00", "1991-12-31 22:00:00", 
"1992-03-28 22:00:00", "1992-09-26 21:00:00", "1993-03-27 22:00:00", 
"1993-09-25 21:00:00", "1994-03-26 22:00:00", "1994-09-24 21:00:00", 
"1994-12-31 22:00:00", "1995-03-26 01:00:00", "1995-09-24 01:00:00", 
"1996-03-31 01:00:00", "1996-10-27 01:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(7200, 10800, 
3600, 3600, 7200, 3600, 10800, 14400, 10800, 14400, 10800, 14400, 
10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 
14400, 10800, 14400, 10800, 10800, 7200, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200)), .Names = c("Kiev", "offSet"
), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", 
"43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", 
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", 
"65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", 
"76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", 
"87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", 
"98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107"), class = "data.frame") }


"Lisbon" <- function() {
structure(list(Lisbon = structure(as.integer(c(1, 2, NA, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, NA, NA, NA, NA, 
NA, NA, 98, NA, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 
109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 
122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 
135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 
148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 
161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 
174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 
187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199
)), .Label = c("1911-05-24 00:36:32", "1916-06-17 23:00:00", 
"1917-02-28 23:00:00", "1917-10-14 23:00:00", "1918-03-01 23:00:00", 
"1918-10-14 23:00:00", "1919-02-28 23:00:00", "1919-10-14 23:00:00", 
"1920-02-29 23:00:00", "1920-10-14 23:00:00", "1921-02-28 23:00:00", 
"1921-10-14 23:00:00", "1924-04-16 23:00:00", "1924-10-14 23:00:00", 
"1926-04-17 23:00:00", "1926-10-02 23:00:00", "1927-04-09 23:00:00", 
"1927-10-01 23:00:00", "1928-04-14 23:00:00", "1928-10-06 23:00:00", 
"1929-04-20 23:00:00", "1929-10-05 23:00:00", "1931-04-18 23:00:00", 
"1931-10-03 23:00:00", "1932-04-02 23:00:00", "1932-10-01 23:00:00", 
"1934-04-07 23:00:00", "1934-10-06 23:00:00", "1935-03-30 23:00:00", 
"1935-10-05 23:00:00", "1936-04-18 23:00:00", "1936-10-03 23:00:00", 
"1937-04-03 23:00:00", "1937-10-02 23:00:00", "1938-03-26 23:00:00", 
"1938-10-01 23:00:00", "1939-04-15 23:00:00", "1939-11-18 23:00:00", 
"1940-02-24 23:00:00", "1940-10-05 23:00:00", "1941-04-05 23:00:00", 
"1941-10-05 23:00:00", "1942-03-14 23:00:00", "1942-04-25 22:00:00", 
"1942-08-15 22:00:00", "1942-10-24 23:00:00", "1943-03-13 23:00:00", 
"1943-04-17 22:00:00", "1943-08-28 22:00:00", "1943-10-30 23:00:00", 
"1944-03-11 23:00:00", "1944-04-22 22:00:00", "1944-08-26 22:00:00", 
"1944-10-28 23:00:00", "1945-03-10 23:00:00", "1945-04-21 22:00:00", 
"1945-08-25 22:00:00", "1945-10-27 23:00:00", "1946-04-06 23:00:00", 
"1946-10-05 23:00:00", "1947-04-06 02:00:00", "1947-10-05 02:00:00", 
"1948-04-04 02:00:00", "1948-10-03 02:00:00", "1949-04-03 02:00:00", 
"1949-10-02 02:00:00", "1951-04-01 02:00:00", "1951-10-07 02:00:00", 
"1952-04-06 02:00:00", "1952-10-05 02:00:00", "1953-04-05 02:00:00", 
"1953-10-04 02:00:00", "1954-04-04 02:00:00", "1954-10-03 02:00:00", 
"1955-04-03 02:00:00", "1955-10-02 02:00:00", "1956-04-01 02:00:00", 
"1956-10-07 02:00:00", "1957-04-07 02:00:00", "1957-10-06 02:00:00", 
"1958-04-06 02:00:00", "1958-10-05 02:00:00", "1959-04-05 02:00:00", 
"1959-10-04 02:00:00", "1960-04-03 02:00:00", "1960-10-02 02:00:00", 
"1961-04-02 02:00:00", "1961-10-01 02:00:00", "1962-04-01 02:00:00", 
"1962-10-07 02:00:00", "1963-04-07 02:00:00", "1963-10-06 02:00:00", 
"1964-04-05 02:00:00", "1964-10-04 02:00:00", "1965-04-04 02:00:00", 
"1965-10-03 02:00:00", "1966-04-03 02:00:00", "1979-09-30 01:00:00", 
"1980-09-28 01:00:00", "1981-03-29 01:00:00", "1981-09-27 01:00:00", 
"1982-03-28 01:00:00", "1982-09-26 01:00:00", "1983-03-27 02:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 7200, 3600, 0, 3600, 7200, 
3600, 0, 3600, 7200, 3600, 0, 3600, 7200, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 0, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0)), .Names = c("Lisbon", "offSet"
), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", 
"43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", 
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", 
"65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", 
"76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", 
"87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", 
"98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150", "151", 
"152", "153", "154", "155", "156", "157", "158", "159", "160", 
"161", "162", "163", "164", "165", "166", "167", "168", "169", 
"170", "171", "172", "173", "174", "175", "176", "177", "178", 
"179", "180", "181", "182", "183", "184", "185", "186", "187", 
"188", "189", "190", "191", "192", "193", "194", "195", "196", 
"197", "198", "199", "200", "201", "202", "203", "204", "205", 
"206", "207"), class = "data.frame") }


"Ljubljana" <- function() {
structure(list(Ljubljana = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105)), .Label = c("1941-04-18 22:00:00", 
"1942-11-02 01:00:00", "1943-03-29 01:00:00", "1943-10-04 01:00:00", 
"1944-04-03 01:00:00", "1944-10-02 01:00:00", "1945-05-08 01:00:00", 
"1945-09-16 01:00:00", "1982-11-26 23:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(3600, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600)), .Names = c("Ljubljana", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105"), 
class = "data.frame") }


"London" <- function() {
structure(list(London = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 
141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 
154, 155, 156, 157, NA, 158, 159, 160, 161, 162, 163, 164, 165, 
166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 
179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 
205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 
218, 219, 220, 221, 222, 223, 224, 225, 226, 227)), 
.Label = c("1916-05-21 02:00:00", 
"1916-10-01 02:00:00", "1917-04-08 02:00:00", "1917-09-17 02:00:00", 
"1918-03-24 02:00:00", "1918-09-30 02:00:00", "1919-03-30 02:00:00", 
"1919-09-29 02:00:00", "1920-03-28 02:00:00", "1920-10-25 02:00:00", 
"1921-04-03 02:00:00", "1921-10-03 02:00:00", "1922-03-26 02:00:00", 
"1922-10-08 02:00:00", "1923-04-22 02:00:00", "1923-09-16 02:00:00", 
"1924-04-13 02:00:00", "1924-09-21 02:00:00", "1925-04-19 02:00:00", 
"1925-10-04 02:00:00", "1926-04-18 02:00:00", "1926-10-03 02:00:00", 
"1927-04-10 02:00:00", "1927-10-02 02:00:00", "1928-04-22 02:00:00", 
"1928-10-07 02:00:00", "1929-04-21 02:00:00", "1929-10-06 02:00:00", 
"1930-04-13 02:00:00", "1930-10-05 02:00:00", "1931-04-19 02:00:00", 
"1931-10-04 02:00:00", "1932-04-17 02:00:00", "1932-10-02 02:00:00", 
"1933-04-09 02:00:00", "1933-10-08 02:00:00", "1934-04-22 02:00:00", 
"1934-10-07 02:00:00", "1935-04-14 02:00:00", "1935-10-06 02:00:00", 
"1936-04-19 02:00:00", "1936-10-04 02:00:00", "1937-04-18 02:00:00", 
"1937-10-03 02:00:00", "1938-04-10 02:00:00", "1938-10-02 02:00:00", 
"1939-04-16 02:00:00", "1939-11-19 02:00:00", "1940-02-25 02:00:00", 
"1941-05-04 01:00:00", "1941-08-10 01:00:00", "1942-04-05 01:00:00", 
"1942-08-09 01:00:00", "1943-04-04 01:00:00", "1943-08-15 01:00:00", 
"1944-04-02 01:00:00", "1944-09-17 01:00:00", "1945-04-02 01:00:00", 
"1945-07-15 01:00:00", "1945-10-07 02:00:00", "1946-04-14 02:00:00", 
"1946-10-06 02:00:00", "1947-03-16 02:00:00", "1947-04-13 01:00:00", 
"1947-08-10 01:00:00", "1947-11-02 02:00:00", "1948-03-14 02:00:00", 
"1948-10-31 02:00:00", "1949-04-03 02:00:00", "1949-10-30 02:00:00", 
"1950-04-16 02:00:00", "1950-10-22 02:00:00", "1951-04-15 02:00:00", 
"1951-10-21 02:00:00", "1952-04-20 02:00:00", "1952-10-26 02:00:00", 
"1953-04-19 02:00:00", "1953-10-04 02:00:00", "1954-04-11 02:00:00", 
"1954-10-03 02:00:00", "1955-04-17 02:00:00", "1955-10-02 02:00:00", 
"1956-04-22 02:00:00", "1956-10-07 02:00:00", "1957-04-14 02:00:00", 
"1957-10-06 02:00:00", "1958-04-20 02:00:00", "1958-10-05 02:00:00", 
"1959-04-19 02:00:00", "1959-10-04 02:00:00", "1960-04-10 02:00:00", 
"1960-10-02 02:00:00", "1961-03-26 02:00:00", "1961-10-29 02:00:00", 
"1962-03-25 02:00:00", "1962-10-28 02:00:00", "1963-03-31 02:00:00", 
"1963-10-27 02:00:00", "1964-03-22 02:00:00", "1964-10-25 02:00:00", 
"1965-03-21 02:00:00", "1965-10-24 02:00:00", "1966-03-20 02:00:00", 
"1966-10-23 02:00:00", "1967-03-19 02:00:00", "1967-10-29 02:00:00", 
"1968-02-18 02:00:00", "1968-10-26 23:00:00", "1971-10-31 02:00:00", 
"1972-03-19 02:00:00", "1972-10-29 02:00:00", "1973-03-18 02:00:00", 
"1973-10-28 02:00:00", "1974-03-17 02:00:00", "1974-10-27 02:00:00", 
"1975-03-16 02:00:00", "1975-10-26 02:00:00", "1976-03-21 02:00:00", 
"1976-10-24 02:00:00", "1977-03-20 02:00:00", "1977-10-23 02:00:00", 
"1978-03-19 02:00:00", "1978-10-29 02:00:00", "1979-03-18 02:00:00", 
"1979-10-28 02:00:00", "1980-03-16 02:00:00", "1980-10-26 02:00:00", 
"1981-03-29 01:00:00", "1981-10-25 01:00:00", "1982-03-28 01:00:00", 
"1982-10-24 01:00:00", "1983-03-27 01:00:00", "1983-10-23 01:00:00", 
"1984-03-25 01:00:00", "1984-10-28 01:00:00", "1985-03-31 01:00:00", 
"1985-10-27 01:00:00", "1986-03-30 01:00:00", "1986-10-26 01:00:00", 
"1987-03-29 01:00:00", "1987-10-25 01:00:00", "1988-03-27 01:00:00", 
"1988-10-23 01:00:00", "1989-03-26 01:00:00", "1989-10-29 01:00:00", 
"1990-03-25 01:00:00", "1990-10-28 01:00:00", "1991-03-31 01:00:00", 
"1991-10-27 01:00:00", "1992-03-29 01:00:00", "1992-10-25 01:00:00", 
"1993-03-28 01:00:00", "1993-10-24 01:00:00", "1994-03-27 01:00:00", 
"1994-10-23 01:00:00", "1995-03-26 01:00:00", "1995-10-22 01:00:00", 
"1996-03-31 01:00:00", "1996-10-27 01:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 0, 3600, 0, 3600, 7200, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0)), .Names = c("London", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128", "129", "130", "131", "132", "133", "134", "135", "136", 
"137", "138", "139", "140", "141", "142", "143", "144", "145", 
"146", "147", "148", "149", "150", "151", "152", "153", "154", 
"155", "156", "157", "158", "159", "160", "161", "162", "163", 
"164", "165", "166", "167", "168", "169", "170", "171", "172", 
"173", "174", "175", "176", "177", "178", "179", "180", "181", 
"182", "183", "184", "185", "186", "187", "188", "189", "190", 
"191", "192", "193", "194", "195", "196", "197", "198", "199", 
"200", "201", "202", "203", "204", "205", "206", "207", "208", 
"209", "210", "211", "212", "213", "214", "215", "216", "217", 
"218", "219", "220", "221", "222", "223", "224", "225", "226", 
"227", "228"), class = "data.frame") }


"Luxembourg" <- function() {
structure(list(Luxembourg = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, NA, 15, 16, 17, NA, 18, NA, 
19, NA, 20, NA, 21, NA, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 
109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 
122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 
135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 
148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 
161, 162, 163)), .Label = c("1916-05-14 22:00:00", "1916-09-30 23:00:00", 
"1917-04-28 22:00:00", "1917-09-16 23:00:00", "1918-04-15 01:00:00", 
"1918-09-16 01:00:00", "1918-11-24 23:00:00", "1919-03-01 23:00:00", 
"1919-10-05 02:00:00", "1920-02-14 23:00:00", "1920-10-24 01:00:00", 
"1921-03-14 23:00:00", "1921-10-26 01:00:00", "1922-03-25 23:00:00", 
"1923-04-21 23:00:00", "1923-10-07 01:00:00", "1924-03-29 23:00:00", 
"1925-04-05 23:00:00", "1926-04-17 23:00:00", "1927-04-09 23:00:00", 
"1928-04-14 23:00:00", "1929-04-20 23:00:00", "1929-10-06 02:00:00", 
"1930-04-13 02:00:00", "1930-10-05 02:00:00", "1931-04-19 02:00:00", 
"1931-10-04 02:00:00", "1932-04-03 02:00:00", "1932-10-02 02:00:00", 
"1933-03-26 02:00:00", "1933-10-08 02:00:00", "1934-04-08 02:00:00", 
"1934-10-07 02:00:00", "1935-03-31 02:00:00", "1935-10-06 02:00:00", 
"1936-04-19 02:00:00", "1936-10-04 02:00:00", "1937-04-04 02:00:00", 
"1937-10-03 02:00:00", "1938-03-27 02:00:00", "1938-10-02 02:00:00", 
"1939-04-16 02:00:00", "1939-11-19 02:00:00", "1940-02-25 02:00:00", 
"1940-05-14 02:00:00", "1942-11-02 01:00:00", "1943-03-29 01:00:00", 
"1943-10-04 01:00:00", "1944-04-03 01:00:00", "1944-09-18 01:00:00", 
"1945-04-02 01:00:00", "1945-09-16 01:00:00", "1946-05-19 01:00:00", 
"1946-10-07 01:00:00", "1976-12-31 23:00:00", "1977-04-03 01:00:00", 
"1977-09-25 01:00:00", "1978-04-02 01:00:00", "1978-10-01 01:00:00", 
"1979-04-01 01:00:00", "1979-09-30 01:00:00", "1980-04-06 01:00:00", 
"1980-09-28 01:00:00", "1981-03-29 01:00:00", "1981-09-27 01:00:00", 
"1982-03-28 01:00:00", "1982-09-26 01:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(7200, 3600, 7200, 3600, 7200, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 3600, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600)), .Names = c("Luxembourg", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128", "129", "130", "131", "132", "133", "134", "135", "136", 
"137", "138", "139", "140", "141", "142", "143", "144", "145", 
"146", "147", "148", "149", "150", "151", "152", "153", "154", 
"155", "156", "157", "158", "159", "160", "161", "162", "163", 
"164", "165", "166", "167", "168", "169"), class = "data.frame") }


"Madrid" <- function() {
structure(list(Madrid = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 
141, 142, 143, 144, 145, 146, 147, 148, 149, 150)), 
.Label = c("1917-05-05 23:00:00", 
"1917-10-06 23:00:00", "1918-04-15 23:00:00", "1918-10-06 23:00:00", 
"1919-04-05 23:00:00", "1919-10-06 23:00:00", "1924-04-16 23:00:00", 
"1924-10-04 23:00:00", "1926-04-17 23:00:00", "1926-10-02 23:00:00", 
"1927-04-09 23:00:00", "1927-10-01 23:00:00", "1928-04-14 23:00:00", 
"1928-10-06 23:00:00", "1929-04-20 23:00:00", "1929-10-05 23:00:00", 
"1937-05-22 23:00:00", "1937-10-02 23:00:00", "1938-03-22 23:00:00", 
"1938-10-01 23:00:00", "1939-04-15 23:00:00", "1939-10-07 23:00:00", 
"1940-03-16 23:00:00", "1942-05-02 22:00:00", "1942-09-01 22:00:00", 
"1943-04-17 22:00:00", "1943-10-03 22:00:00", "1944-04-15 22:00:00", 
"1944-10-10 22:00:00", "1945-04-14 22:00:00", "1945-09-29 23:00:00", 
"1946-04-13 22:00:00", "1946-09-29 22:00:00", "1949-04-30 22:00:00", 
"1949-09-29 23:00:00", "1974-04-13 22:00:00", "1974-10-05 23:00:00", 
"1975-04-19 22:00:00", "1975-10-04 23:00:00", "1976-03-27 22:00:00", 
"1976-09-25 23:00:00", "1977-04-02 22:00:00", "1977-09-24 23:00:00", 
"1978-04-02 22:00:00", "1978-09-30 23:00:00", "1978-12-31 23:00:00", 
"1979-04-01 01:00:00", "1979-09-30 01:00:00", "1980-04-06 01:00:00", 
"1980-09-28 01:00:00", "1981-03-29 01:00:00", "1981-09-27 01:00:00", 
"1982-03-28 01:00:00", "1982-09-26 01:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600)), .Names = c("Madrid", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150"), 
class = "data.frame") }


"Monaco" <- function() {
structure(list(Monaco = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, NA, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 
153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 
166, 167, 168, 169, 170)), .Label = c("1911-03-10 23:50:39", 
"1916-06-14 23:00:00", "1916-10-01 23:00:00", "1917-03-24 23:00:00", 
"1917-10-07 23:00:00", "1918-03-09 23:00:00", "1918-10-06 23:00:00", 
"1919-03-01 23:00:00", "1919-10-05 23:00:00", "1920-02-14 23:00:00", 
"1920-10-23 23:00:00", "1921-03-14 23:00:00", "1921-10-25 23:00:00", 
"1922-03-25 23:00:00", "1922-10-07 23:00:00", "1923-05-26 23:00:00", 
"1923-10-06 23:00:00", "1924-03-29 23:00:00", "1924-10-04 23:00:00", 
"1925-04-04 23:00:00", "1925-10-03 23:00:00", "1926-04-17 23:00:00", 
"1926-10-02 23:00:00", "1927-04-09 23:00:00", "1927-10-01 23:00:00", 
"1928-04-14 23:00:00", "1928-10-06 23:00:00", "1929-04-20 23:00:00", 
"1929-10-05 23:00:00", "1930-04-12 23:00:00", "1930-10-04 23:00:00", 
"1931-04-18 23:00:00", "1931-10-03 23:00:00", "1932-04-02 23:00:00", 
"1932-10-01 23:00:00", "1933-03-25 23:00:00", "1933-10-07 23:00:00", 
"1934-04-07 23:00:00", "1934-10-06 23:00:00", "1935-03-30 23:00:00", 
"1935-10-05 23:00:00", "1936-04-18 23:00:00", "1936-10-03 23:00:00", 
"1937-04-03 23:00:00", "1937-10-02 23:00:00", "1938-03-26 23:00:00", 
"1938-10-01 23:00:00", "1939-04-15 23:00:00", "1939-11-18 23:00:00", 
"1940-02-25 02:00:00", "1941-05-04 23:00:00", "1941-10-05 22:00:00", 
"1942-03-08 23:00:00", "1942-11-02 01:00:00", "1943-03-29 01:00:00", 
"1943-10-04 01:00:00", "1944-04-03 01:00:00", "1944-10-07 23:00:00", 
"1945-04-02 01:00:00", "1945-09-16 01:00:00", "1976-09-25 23:00:00", 
"1976-12-31 23:00:00", "1977-04-03 01:00:00", "1977-09-25 01:00:00", 
"1978-04-02 01:00:00", "1978-10-01 01:00:00", "1979-04-01 01:00:00", 
"1979-09-30 01:00:00", "1980-04-06 01:00:00", "1980-09-28 01:00:00", 
"1981-03-29 01:00:00", "1981-09-27 01:00:00", "1982-03-28 01:00:00", 
"1982-09-26 01:00:00", "1983-03-27 01:00:00", "1983-09-25 01:00:00", 
"1984-03-25 01:00:00", "1984-09-30 01:00:00", "1985-03-31 01:00:00", 
"1985-09-29 01:00:00", "1986-03-30 01:00:00", "1986-09-28 01:00:00", 
"1987-03-29 01:00:00", "1987-09-27 01:00:00", "1988-03-27 01:00:00", 
"1988-09-25 01:00:00", "1989-03-26 01:00:00", "1989-09-24 01:00:00", 
"1990-03-25 01:00:00", "1990-09-30 01:00:00", "1991-03-31 01:00:00", 
"1991-09-29 01:00:00", "1992-03-29 01:00:00", "1992-09-27 01:00:00", 
"1993-03-28 01:00:00", "1993-09-26 01:00:00", "1994-03-27 01:00:00", 
"1994-09-25 01:00:00", "1995-03-26 01:00:00", "1995-09-24 01:00:00", 
"1996-03-31 01:00:00", "1996-10-27 01:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600)), .Names = c("Monaco", "offSet"
), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", 
"43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", 
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", 
"65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", 
"76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", 
"87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", 
"98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150", "151", 
"152", "153", "154", "155", "156", "157", "158", "159", "160", 
"161", "162", "163", "164", "165", "166", "167", "168", "169", 
"170", "171"), class = "data.frame") }


"Moscow" <- function() {
structure(list(Moscow = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, NA, NA, 36, 
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 
69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113
)), .Label = c("1916-07-02 21:30:00", "1917-07-01 20:29:12", 
"1917-12-27 20:29:12", "1918-05-31 19:29:12", "1918-09-15 20:29:12", 
"1919-05-31 19:29:12", "1919-06-30 21:29:12", "1919-08-15 20:00:00", 
"1921-02-14 20:00:00", "1921-03-20 19:00:00", "1921-08-31 19:00:00", 
"1921-09-30 20:00:00", "1922-09-30 21:00:00", "1930-06-20 22:00:00", 
"1981-03-31 21:00:00", "1981-09-30 20:00:00", "1982-03-31 21:00:00", 
"1982-09-30 20:00:00", "1983-03-31 21:00:00", "1983-09-30 20:00:00", 
"1984-03-31 21:00:00", "1984-09-29 23:00:00", "1985-03-30 23:00:00", 
"1985-09-28 23:00:00", "1986-03-29 23:00:00", "1986-09-27 23:00:00", 
"1987-03-28 23:00:00", "1987-09-26 23:00:00", "1988-03-26 23:00:00", 
"1988-09-24 23:00:00", "1989-03-25 23:00:00", "1989-09-23 23:00:00", 
"1990-03-24 23:00:00", "1990-09-29 23:00:00", "1991-03-30 23:00:00", 
"1992-03-28 20:00:00", "1992-09-26 19:00:00", "1993-03-27 23:00:00", 
"1993-09-25 23:00:00", "1994-03-26 23:00:00", "1994-09-24 23:00:00", 
"1995-03-25 23:00:00", "1995-09-23 23:00:00", "1996-03-30 23:00:00", 
"1996-10-26 23:00:00", "1997-03-29 23:00:00", "1997-10-25 23:00:00", 
"1998-03-28 23:00:00", "1998-10-24 23:00:00", "1999-03-27 23:00:00", 
"1999-10-30 23:00:00", "2000-03-25 23:00:00", "2000-10-28 23:00:00", 
"2001-03-24 23:00:00", "2001-10-27 23:00:00", "2002-03-30 23:00:00", 
"2002-10-26 23:00:00", "2003-03-29 23:00:00", "2003-10-25 23:00:00", 
"2004-03-27 23:00:00", "2004-10-30 23:00:00", "2005-03-26 23:00:00", 
"2005-10-29 23:00:00", "2006-03-25 23:00:00", "2006-10-28 23:00:00", 
"2007-03-24 23:00:00", "2007-10-27 23:00:00", "2008-03-29 23:00:00", 
"2008-10-25 23:00:00", "2009-03-28 23:00:00", "2009-10-24 23:00:00", 
"2010-03-27 23:00:00", "2010-10-30 23:00:00", "2011-03-26 23:00:00", 
"2011-10-29 23:00:00", "2012-03-24 23:00:00", "2012-10-27 23:00:00", 
"2013-03-30 23:00:00", "2013-10-26 23:00:00", "2014-03-29 23:00:00", 
"2014-10-25 23:00:00", "2015-03-28 23:00:00", "2015-10-24 23:00:00", 
"2016-03-26 23:00:00", "2016-10-29 23:00:00", "2017-03-25 23:00:00", 
"2017-10-28 23:00:00", "2018-03-24 23:00:00", "2018-10-27 23:00:00", 
"2019-03-30 23:00:00", "2019-10-26 23:00:00", "2020-03-28 23:00:00", 
"2020-10-24 23:00:00", "2021-03-27 23:00:00", "2021-10-30 23:00:00", 
"2022-03-26 23:00:00", "2022-10-29 23:00:00", "2023-03-25 23:00:00", 
"2023-10-28 23:00:00", "2024-03-30 23:00:00", "2024-10-26 23:00:00", 
"2025-03-29 23:00:00", "2025-10-25 23:00:00", "2026-03-28 23:00:00", 
"2026-10-24 23:00:00", "2027-03-27 23:00:00", "2027-10-30 23:00:00", 
"2028-03-25 23:00:00", "2028-10-28 23:00:00", "2029-03-24 23:00:00", 
"2029-10-27 23:00:00", "2030-03-30 23:00:00", "2030-10-26 23:00:00"
), class = "factor"), offSet = c(830880, 1190880, 830880, 1550880, 
1190880, 1550880, 14400, 10800, 14400, 18000, 14400, 10800, 7200, 
10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 
14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 
10800, 14400, 10800, 10800, 7200, 10800, 14400, 10800, 14400, 
10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 
14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 
10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 
14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 
10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 
14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 
10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 
14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 
10800, 14400, 10800)), .Names = c("Moscow", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115"), class = "data.frame") }


"Nicosia" <- function() {
structure(list(Nicosia = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113)), 
.Label = c("1975-04-12 22:00:00", 
"1975-10-11 21:00:00", "1976-05-14 22:00:00", "1976-10-10 21:00:00", 
"1977-04-02 22:00:00", "1977-09-24 21:00:00", "1978-04-01 22:00:00", 
"1978-10-01 21:00:00", "1979-03-31 22:00:00", "1979-09-29 21:00:00", 
"1980-04-05 22:00:00", "1980-09-27 21:00:00", "1981-03-28 22:00:00", 
"1981-09-26 21:00:00", "1982-03-27 22:00:00", "1982-09-25 21:00:00", 
"1983-03-26 22:00:00", "1983-09-24 21:00:00", "1984-03-24 22:00:00", 
"1984-09-29 21:00:00", "1985-03-30 22:00:00", "1985-09-28 21:00:00", 
"1986-03-29 22:00:00", "1986-09-27 21:00:00", "1987-03-28 22:00:00", 
"1987-09-26 21:00:00", "1988-03-26 22:00:00", "1988-09-24 21:00:00", 
"1989-03-25 22:00:00", "1989-09-23 21:00:00", "1990-03-24 22:00:00", 
"1990-09-29 21:00:00", "1991-03-30 22:00:00", "1991-09-28 21:00:00", 
"1992-03-28 22:00:00", "1992-09-26 21:00:00", "1993-03-27 22:00:00", 
"1993-09-25 21:00:00", "1994-03-26 22:00:00", "1994-09-24 21:00:00", 
"1995-03-25 22:00:00", "1995-09-23 21:00:00", "1996-03-30 22:00:00", 
"1996-09-28 21:00:00", "1997-03-29 22:00:00", "1997-09-27 21:00:00", 
"1998-03-28 22:00:00", "1998-08-31 21:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200)), .Names = c("Nicosia", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113"), class = "data.frame") }


"Oslo" <- function() {
structure(list(Oslo = structure(as.integer(c(NA, 1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126
)), .Label = c("1916-09-29 22:00:00", "1940-08-10 22:00:00", 
"1942-11-02 01:00:00", "1943-03-29 01:00:00", "1943-10-04 01:00:00", 
"1944-04-03 01:00:00", "1944-10-02 01:00:00", "1945-04-02 01:00:00", 
"1945-10-01 01:00:00", "1959-03-15 01:00:00", "1959-09-20 01:00:00", 
"1960-03-20 01:00:00", "1960-09-18 01:00:00", "1961-03-19 01:00:00", 
"1961-09-17 01:00:00", "1962-03-18 01:00:00", "1962-09-16 01:00:00", 
"1963-03-17 01:00:00", "1963-09-15 01:00:00", "1964-03-15 01:00:00", 
"1964-09-20 01:00:00", "1965-04-25 01:00:00", "1965-09-19 01:00:00", 
"1979-12-31 23:00:00", "1980-04-06 01:00:00", "1980-09-28 01:00:00", 
"1981-03-29 01:00:00", "1981-09-27 01:00:00", "1982-03-28 01:00:00", 
"1982-09-26 01:00:00", "1983-03-27 01:00:00", "1983-09-25 01:00:00", 
"1984-03-25 01:00:00", "1984-09-30 01:00:00", "1985-03-31 01:00:00", 
"1985-09-29 01:00:00", "1986-03-30 01:00:00", "1986-09-28 01:00:00", 
"1987-03-29 01:00:00", "1987-09-27 01:00:00", "1988-03-27 01:00:00", 
"1988-09-25 01:00:00", "1989-03-26 01:00:00", "1989-09-24 01:00:00", 
"1990-03-25 01:00:00", "1990-09-30 01:00:00", "1991-03-31 01:00:00", 
"1991-09-29 01:00:00", "1992-03-29 01:00:00", "1992-09-27 01:00:00", 
"1993-03-28 01:00:00", "1993-09-26 01:00:00", "1994-03-27 01:00:00", 
"1994-09-25 01:00:00", "1995-03-26 01:00:00", "1995-09-24 01:00:00", 
"1996-03-31 01:00:00", "1996-10-27 01:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(7200, 3600, 
3600, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600)), .Names = c("Oslo", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127"
), class = "data.frame") }


"Paris" <- function() {
structure(list(Paris = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, NA, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 
153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 
166, 167, 168, 169)), .Label = c("1911-03-10 23:51:39", "1916-06-14 23:00:00", 
"1916-10-01 23:00:00", "1917-03-24 23:00:00", "1917-10-07 23:00:00", 
"1918-03-09 23:00:00", "1918-10-06 23:00:00", "1919-03-01 23:00:00", 
"1919-10-05 23:00:00", "1920-02-14 23:00:00", "1920-10-23 23:00:00", 
"1921-03-14 23:00:00", "1921-10-25 23:00:00", "1922-03-25 23:00:00", 
"1922-10-07 23:00:00", "1923-05-26 23:00:00", "1923-10-06 23:00:00", 
"1924-03-29 23:00:00", "1924-10-04 23:00:00", "1925-04-04 23:00:00", 
"1925-10-03 23:00:00", "1926-04-17 23:00:00", "1926-10-02 23:00:00", 
"1927-04-09 23:00:00", "1927-10-01 23:00:00", "1928-04-14 23:00:00", 
"1928-10-06 23:00:00", "1929-04-20 23:00:00", "1929-10-05 23:00:00", 
"1930-04-12 23:00:00", "1930-10-04 23:00:00", "1931-04-18 23:00:00", 
"1931-10-03 23:00:00", "1932-04-02 23:00:00", "1932-10-01 23:00:00", 
"1933-03-25 23:00:00", "1933-10-07 23:00:00", "1934-04-07 23:00:00", 
"1934-10-06 23:00:00", "1935-03-30 23:00:00", "1935-10-05 23:00:00", 
"1936-04-18 23:00:00", "1936-10-03 23:00:00", "1937-04-03 23:00:00", 
"1937-10-02 23:00:00", "1938-03-26 23:00:00", "1938-10-01 23:00:00", 
"1939-04-15 23:00:00", "1939-11-18 23:00:00", "1940-02-25 02:00:00", 
"1940-06-14 22:00:00", "1942-11-02 01:00:00", "1943-03-29 01:00:00", 
"1943-10-04 01:00:00", "1944-04-03 01:00:00", "1944-08-24 22:00:00", 
"1944-10-08 01:00:00", "1945-04-02 01:00:00", "1945-09-16 01:00:00", 
"1976-09-25 23:00:00", "1976-12-31 23:00:00", "1977-04-03 01:00:00", 
"1977-09-25 01:00:00", "1978-04-02 01:00:00", "1978-10-01 01:00:00", 
"1979-04-01 01:00:00", "1979-09-30 01:00:00", "1980-04-06 01:00:00", 
"1980-09-28 01:00:00", "1981-03-29 01:00:00", "1981-09-27 01:00:00", 
"1982-03-28 01:00:00", "1982-09-26 01:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 
3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 0, 3600, 
3600, 3600, 7200, 3600, 7200, 0, 3600, 7200, 3600, 7200, 
3600, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600
)), .Names = c("Paris", "offSet"), row.names = c("1", "2", 
"3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", 
"15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", 
"26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", 
"37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", 
"48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", 
"59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", 
"70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", 
"81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", 
"92", "93", "94", "95", "96", "97", "98", "99", "100", "101", 
"102", "103", "104", "105", "106", "107", "108", "109", "110", 
"111", "112", "113", "114", "115", "116", "117", "118", "119", 
"120", "121", "122", "123", "124", "125", "126", "127", "128", 
"129", "130", "131", "132", "133", "134", "135", "136", "137", 
"138", "139", "140", "141", "142", "143", "144", "145", "146", 
"147", "148", "149", "150", "151", "152", "153", "154", "155", 
"156", "157", "158", "159", "160", "161", "162", "163", "164", 
"165", "166", "167", "168", "169", "170"), class = "data.frame") }


"Prague" <- function() {
structure(list(Prague = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 
128)), .Label = c("1891-09-30 23:02:16", "1916-04-30 22:00:00", 
"1916-09-30 23:00:00", "1917-04-16 01:00:00", "1917-09-17 01:00:00", 
"1918-04-15 01:00:00", "1918-09-16 01:00:00", "1940-04-01 01:00:00", 
"1942-11-02 01:00:00", "1943-03-29 01:00:00", "1943-10-04 01:00:00", 
"1944-04-03 01:00:00", "1944-09-17 01:00:00", "1945-04-08 01:00:00", 
"1945-11-18 01:00:00", "1946-05-06 01:00:00", "1946-10-06 01:00:00", 
"1947-04-20 01:00:00", "1947-10-05 01:00:00", "1948-04-18 01:00:00", 
"1948-10-03 01:00:00", "1949-04-09 01:00:00", "1949-10-02 01:00:00", 
"1978-12-31 23:00:00", "1979-04-01 01:00:00", "1979-09-30 01:00:00", 
"1980-04-06 01:00:00", "1980-09-28 01:00:00", "1981-03-29 01:00:00", 
"1981-09-27 01:00:00", "1982-03-28 01:00:00", "1982-09-26 01:00:00", 
"1983-03-27 01:00:00", "1983-09-25 01:00:00", "1984-03-25 01:00:00", 
"1984-09-30 01:00:00", "1985-03-31 01:00:00", "1985-09-29 01:00:00", 
"1986-03-30 01:00:00", "1986-09-28 01:00:00", "1987-03-29 01:00:00", 
"1987-09-27 01:00:00", "1988-03-27 01:00:00", "1988-09-25 01:00:00", 
"1989-03-26 01:00:00", "1989-09-24 01:00:00", "1990-03-25 01:00:00", 
"1990-09-30 01:00:00", "1991-03-31 01:00:00", "1991-09-29 01:00:00", 
"1992-03-29 01:00:00", "1992-09-27 01:00:00", "1993-03-28 01:00:00", 
"1993-09-26 01:00:00", "1994-03-27 01:00:00", "1994-09-25 01:00:00", 
"1995-03-26 01:00:00", "1995-09-24 01:00:00", "1996-03-31 01:00:00", 
"1996-10-27 01:00:00", "1997-03-30 01:00:00", "1997-10-26 01:00:00", 
"1998-03-29 01:00:00", "1998-10-25 01:00:00", "1999-03-28 01:00:00", 
"1999-10-31 01:00:00", "2000-03-26 01:00:00", "2000-10-29 01:00:00", 
"2001-03-25 01:00:00", "2001-10-28 01:00:00", "2002-03-31 01:00:00", 
"2002-10-27 01:00:00", "2003-03-30 01:00:00", "2003-10-26 01:00:00", 
"2004-03-28 01:00:00", "2004-10-31 01:00:00", "2005-03-27 01:00:00", 
"2005-10-30 01:00:00", "2006-03-26 01:00:00", "2006-10-29 01:00:00", 
"2007-03-25 01:00:00", "2007-10-28 01:00:00", "2008-03-30 01:00:00", 
"2008-10-26 01:00:00", "2009-03-29 01:00:00", "2009-10-25 01:00:00", 
"2010-03-28 01:00:00", "2010-10-31 01:00:00", "2011-03-27 01:00:00", 
"2011-10-30 01:00:00", "2012-03-25 01:00:00", "2012-10-28 01:00:00", 
"2013-03-31 01:00:00", "2013-10-27 01:00:00", "2014-03-30 01:00:00", 
"2014-10-26 01:00:00", "2015-03-29 01:00:00", "2015-10-25 01:00:00", 
"2016-03-27 01:00:00", "2016-10-30 01:00:00", "2017-03-26 01:00:00", 
"2017-10-29 01:00:00", "2018-03-25 01:00:00", "2018-10-28 01:00:00", 
"2019-03-31 01:00:00", "2019-10-27 01:00:00", "2020-03-29 01:00:00", 
"2020-10-25 01:00:00", "2021-03-28 01:00:00", "2021-10-31 01:00:00", 
"2022-03-27 01:00:00", "2022-10-30 01:00:00", "2023-03-26 01:00:00", 
"2023-10-29 01:00:00", "2024-03-31 01:00:00", "2024-10-27 01:00:00", 
"2025-03-30 01:00:00", "2025-10-26 01:00:00", "2026-03-29 01:00:00", 
"2026-10-25 01:00:00", "2027-03-28 01:00:00", "2027-10-31 01:00:00", 
"2028-03-26 01:00:00", "2028-10-29 01:00:00", "2029-03-25 01:00:00", 
"2029-10-28 01:00:00", "2030-03-31 01:00:00", "2030-10-27 01:00:00"
), class = "factor"), offSet = c(3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600)), .Names = c("Prague", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128"), class = "data.frame") }


"Riga" <- function() {
structure(list(Riga = structure(as.integer(c(1, 2, 3, 4, 5, 6, 
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, 31, 32, 33, 34, 35, 36, 37, 38, 39, 
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 
56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 
88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99)), 
.Label = c("1918-04-15 00:23:36", 
"1918-09-16 00:23:36", "1919-04-01 00:23:36", "1919-05-22 00:23:36", 
"1926-05-10 22:23:36", "1940-08-04 22:00:00", "1941-06-30 21:00:00", 
"1942-11-02 01:00:00", "1943-03-29 01:00:00", "1943-10-04 01:00:00", 
"1944-04-03 01:00:00", "1944-10-02 01:00:00", "1944-10-12 23:00:00", 
"1981-03-31 21:00:00", "1981-09-30 20:00:00", "1982-03-31 21:00:00", 
"1982-09-30 20:00:00", "1983-03-31 21:00:00", "1983-09-30 20:00:00", 
"1984-03-31 21:00:00", "1984-09-29 23:00:00", "1985-03-30 23:00:00", 
"1985-09-28 23:00:00", "1986-03-29 23:00:00", "1986-09-27 23:00:00", 
"1987-03-28 23:00:00", "1987-09-26 23:00:00", "1988-03-26 23:00:00", 
"1988-09-24 23:00:00", "1989-03-25 23:00:00", "1997-01-20 22:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-02-28 22:00:00", "2000-12-31 22:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(851040, 491040, 851040, 491040, 7200, 10800, 3600, 
3600, 7200, 3600, 7200, 3600, 10800, 14400, 10800, 14400, 
10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 
14400, 10800, 14400, 10800, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
7200, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200)), .Names = c("Riga", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114"), 
class = "data.frame") }


"Rome" <- function() {
structure(list(Rome = structure(as.integer(c(1, 2, 3, 4, 5, 6, 
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 
141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 
154, 155, 156, 157)), .Label = c("1893-10-31 23:10:04", 
"1916-06-02 23:00:00", 
"1916-09-30 23:00:00", "1917-03-31 23:00:00", "1917-09-29 23:00:00", 
"1918-03-09 23:00:00", "1918-10-05 23:00:00", "1919-03-01 23:00:00", 
"1919-10-04 23:00:00", "1920-03-20 23:00:00", "1920-09-18 23:00:00", 
"1940-06-14 23:00:00", "1942-11-02 01:00:00", "1943-03-29 01:00:00", 
"1943-10-04 01:00:00", "1944-04-03 01:00:00", "1944-06-30 22:00:00", 
"1944-09-16 23:00:00", "1945-04-02 01:00:00", "1945-09-14 23:00:00", 
"1946-03-17 01:00:00", "1946-10-06 01:00:00", "1947-03-15 23:00:00", 
"1947-10-04 23:00:00", "1948-02-29 01:00:00", "1948-10-03 01:00:00", 
"1966-05-21 23:00:00", "1966-09-24 22:00:00", "1967-05-27 23:00:00", 
"1967-09-23 22:00:00", "1968-05-25 23:00:00", "1968-09-21 22:00:00", 
"1969-05-31 23:00:00", "1969-09-27 22:00:00", "1970-05-30 23:00:00", 
"1970-09-26 22:00:00", "1971-05-22 23:00:00", "1971-09-25 23:00:00", 
"1972-05-27 23:00:00", "1972-09-30 22:00:00", "1973-06-02 23:00:00", 
"1973-09-29 22:00:00", "1974-05-25 23:00:00", "1974-09-28 22:00:00", 
"1975-05-31 23:00:00", "1975-09-27 23:00:00", "1976-05-29 23:00:00", 
"1976-09-25 23:00:00", "1977-05-21 23:00:00", "1977-09-24 23:00:00", 
"1978-05-27 23:00:00", "1978-09-30 23:00:00", "1979-05-26 23:00:00", 
"1979-09-29 23:00:00", "1979-12-31 23:00:00", "1980-04-06 01:00:00", 
"1980-09-28 01:00:00", "1981-03-29 01:00:00", "1981-09-27 01:00:00", 
"1982-03-28 01:00:00", "1982-09-26 01:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600)), .Names = c("Rome", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123", "124", 
"125", "126", "127", "128", "129", "130", "131", "132", "133", 
"134", "135", "136", "137", "138", "139", "140", "141", "142", 
"143", "144", "145", "146", "147", "148", "149", "150", "151", 
"152", "153", "154", "155", "156", "157"), class = "data.frame") }


"Sofia" <- function() {
structure(list(Sofia = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)), 
.Label = c("1894-11-29 22:03:04", 
"1942-11-02 01:00:00", "1943-03-29 01:00:00", "1943-10-04 01:00:00", 
"1944-04-03 01:00:00", "1944-10-02 01:00:00", "1945-04-02 02:00:00", 
"1979-03-31 21:00:00", "1979-09-30 22:00:00", "1980-04-05 21:00:00", 
"1980-09-28 22:00:00", "1981-04-04 21:00:00", "1981-09-26 23:00:00", 
"1982-04-03 21:00:00", "1990-12-31 22:00:00", "1991-03-30 22:00:00", 
"1991-09-28 21:00:00", "1992-03-28 22:00:00", "1992-09-26 21:00:00", 
"1993-03-27 22:00:00", "1993-09-25 21:00:00", "1994-03-26 22:00:00", 
"1994-09-24 21:00:00", "1995-03-25 22:00:00", "1995-09-23 21:00:00", 
"1996-03-30 22:00:00", "1996-10-26 21:00:00", "1996-12-31 22:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(7200, 3600, 7200, 3600, 7200, 3600, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200)), .Names = c("Sofia", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", 
"53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", 
"64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", 
"75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", 
"86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", 
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113"), class = "data.frame") }


"Stockholm" <- function() {
structure(list(Stockholm = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106)), .Label = c("1899-12-31 22:59:46", 
"1916-05-14 22:00:00", "1916-09-30 23:00:00", "1979-12-31 23:00:00", 
"1980-04-06 01:00:00", "1980-09-28 01:00:00", "1981-03-29 01:00:00", 
"1981-09-27 01:00:00", "1982-03-28 01:00:00", "1982-09-26 01:00:00", 
"1983-03-27 01:00:00", "1983-09-25 01:00:00", "1984-03-25 01:00:00", 
"1984-09-30 01:00:00", "1985-03-31 01:00:00", "1985-09-29 01:00:00", 
"1986-03-30 01:00:00", "1986-09-28 01:00:00", "1987-03-29 01:00:00", 
"1987-09-27 01:00:00", "1988-03-27 01:00:00", "1988-09-25 01:00:00", 
"1989-03-26 01:00:00", "1989-09-24 01:00:00", "1990-03-25 01:00:00", 
"1990-09-30 01:00:00", "1991-03-31 01:00:00", "1991-09-29 01:00:00", 
"1992-03-29 01:00:00", "1992-09-27 01:00:00", "1993-03-28 01:00:00", 
"1993-09-26 01:00:00", "1994-03-27 01:00:00", "1994-09-25 01:00:00", 
"1995-03-26 01:00:00", "1995-09-24 01:00:00", "1996-03-31 01:00:00", 
"1996-10-27 01:00:00", "1997-03-30 01:00:00", "1997-10-26 01:00:00", 
"1998-03-29 01:00:00", "1998-10-25 01:00:00", "1999-03-28 01:00:00", 
"1999-10-31 01:00:00", "2000-03-26 01:00:00", "2000-10-29 01:00:00", 
"2001-03-25 01:00:00", "2001-10-28 01:00:00", "2002-03-31 01:00:00", 
"2002-10-27 01:00:00", "2003-03-30 01:00:00", "2003-10-26 01:00:00", 
"2004-03-28 01:00:00", "2004-10-31 01:00:00", "2005-03-27 01:00:00", 
"2005-10-30 01:00:00", "2006-03-26 01:00:00", "2006-10-29 01:00:00", 
"2007-03-25 01:00:00", "2007-10-28 01:00:00", "2008-03-30 01:00:00", 
"2008-10-26 01:00:00", "2009-03-29 01:00:00", "2009-10-25 01:00:00", 
"2010-03-28 01:00:00", "2010-10-31 01:00:00", "2011-03-27 01:00:00", 
"2011-10-30 01:00:00", "2012-03-25 01:00:00", "2012-10-28 01:00:00", 
"2013-03-31 01:00:00", "2013-10-27 01:00:00", "2014-03-30 01:00:00", 
"2014-10-26 01:00:00", "2015-03-29 01:00:00", "2015-10-25 01:00:00", 
"2016-03-27 01:00:00", "2016-10-30 01:00:00", "2017-03-26 01:00:00", 
"2017-10-29 01:00:00", "2018-03-25 01:00:00", "2018-10-28 01:00:00", 
"2019-03-31 01:00:00", "2019-10-27 01:00:00", "2020-03-29 01:00:00", 
"2020-10-25 01:00:00", "2021-03-28 01:00:00", "2021-10-31 01:00:00", 
"2022-03-27 01:00:00", "2022-10-30 01:00:00", "2023-03-26 01:00:00", 
"2023-10-29 01:00:00", "2024-03-31 01:00:00", "2024-10-27 01:00:00", 
"2025-03-30 01:00:00", "2025-10-26 01:00:00", "2026-03-29 01:00:00", 
"2026-10-25 01:00:00", "2027-03-28 01:00:00", "2027-10-31 01:00:00", 
"2028-03-26 01:00:00", "2028-10-29 01:00:00", "2029-03-25 01:00:00", 
"2029-10-28 01:00:00", "2030-03-31 01:00:00", "2030-10-27 01:00:00"
), class = "factor"), offSet = c(3600, 7200, 3600, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600)), .Names = c("Stockholm", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106"), class = "data.frame") }


"Tallinn" <- function() {
structure(list(Tallinn = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, 30, 31, 32, 33, 34)), 
.Label = c("1918-01-31 22:21:00", 
"1918-04-15 01:00:00", "1918-09-16 01:00:00", "1919-06-30 23:00:00", 
"1921-04-30 22:21:00", "1940-08-05 22:00:00", "1941-09-14 21:00:00", 
"1942-11-02 01:00:00", "1943-03-29 01:00:00", "1943-10-04 01:00:00", 
"1944-04-03 01:00:00", "1944-09-21 22:00:00", "1981-03-31 21:00:00", 
"1981-09-30 20:00:00", "1982-03-31 21:00:00", "1982-09-30 20:00:00", 
"1983-03-31 21:00:00", "1983-09-30 20:00:00", "1984-03-31 21:00:00", 
"1984-09-29 23:00:00", "1985-03-30 23:00:00", "1985-09-28 23:00:00", 
"1986-03-29 23:00:00", "1986-09-27 23:00:00", "1987-03-28 23:00:00", 
"1987-09-26 23:00:00", "1988-03-26 23:00:00", "1988-09-24 23:00:00", 
"1989-03-25 23:00:00", "1998-09-21 21:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "1999-10-31 22:00:00"
), class = "factor"), offSet = c(3600, 7200, 3600, 5940, 7200, 
10800, 3600, 3600, 7200, 3600, 7200, 10800, 14400, 10800, 14400, 
10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 
14400, 10800, 14400, 10800, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 
7200, 10800, 7200, 10800, 7200, 7200, 10800, 7200, 7200)), .Names = c("Tallinn", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52"
), class = "data.frame") }


"Vaduz" <- function() {
structure(list(Vaduz = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101)), 
.Label = c("1980-12-31 23:00:00", 
"1981-03-29 01:00:00", "1981-09-27 01:00:00", "1982-03-28 01:00:00", 
"1982-09-26 01:00:00", "1983-03-27 01:00:00", "1983-09-25 01:00:00", 
"1984-03-25 01:00:00", "1984-09-30 01:00:00", "1985-03-31 01:00:00", 
"1985-09-29 01:00:00", "1986-03-30 01:00:00", "1986-09-28 01:00:00", 
"1987-03-29 01:00:00", "1987-09-27 01:00:00", "1988-03-27 01:00:00", 
"1988-09-25 01:00:00", "1989-03-26 01:00:00", "1989-09-24 01:00:00", 
"1990-03-25 01:00:00", "1990-09-30 01:00:00", "1991-03-31 01:00:00", 
"1991-09-29 01:00:00", "1992-03-29 01:00:00", "1992-09-27 01:00:00", 
"1993-03-28 01:00:00", "1993-09-26 01:00:00", "1994-03-27 01:00:00", 
"1994-09-25 01:00:00", "1995-03-26 01:00:00", "1995-09-24 01:00:00", 
"1996-03-31 01:00:00", "1996-10-27 01:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600
)), .Names = c("Vaduz", "offSet"), row.names = c("1", "2", "3", 
"4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", 
"16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", 
"27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", 
"38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", 
"49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", 
"60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", 
"71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", 
"82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", 
"93", "94", "95", "96", "97", "98", "99", "100", "101"), 
class = "data.frame") }


"Vienna" <- function() {
structure(list(Vienna = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 
115, 116, 117, 118, 119, 120, 121, 122, 123)), 
.Label = c("1916-04-30 22:00:00", 
"1916-09-30 23:00:00", "1917-04-16 01:00:00", "1917-09-17 01:00:00", 
"1918-04-15 01:00:00", "1918-06-16 01:00:00", "1920-04-05 01:00:00", 
"1920-09-13 01:00:00", "1940-04-01 01:00:00", "1942-11-02 01:00:00", 
"1943-03-29 01:00:00", "1943-10-04 01:00:00", "1944-04-03 01:00:00", 
"1944-10-02 01:00:00", "1945-04-02 01:00:00", "1945-11-18 01:00:00", 
"1946-04-14 01:00:00", "1946-10-06 01:00:00", "1947-04-06 01:00:00", 
"1947-10-05 01:00:00", "1948-04-18 01:00:00", "1948-10-03 01:00:00", 
"1980-12-31 23:00:00", "1981-03-29 01:00:00", "1981-09-27 01:00:00", 
"1982-03-28 01:00:00", "1982-09-26 01:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600)), .Names = c("Vienna", "offSet"
), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", 
"43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", 
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", 
"65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", 
"76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", 
"87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", 
"98", "99", "100", "101", "102", "103", "104", "105", "106", 
"107", "108", "109", "110", "111", "112", "113", "114", "115", 
"116", "117", "118", "119", "120", "121", "122", "123"), 
class = "data.frame") }


"Vilnius" <- function() {
structure(list(Vilnius = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, 33, 34, 35, 36, 37)), 
.Label = c("1916-12-31 22:36:00", 
"1919-10-09 22:24:24", "1920-07-11 23:00:00", "1920-10-08 22:00:00", 
"1940-08-02 23:00:00", "1941-06-23 21:00:00", "1942-11-02 01:00:00", 
"1943-03-29 01:00:00", "1943-10-04 01:00:00", "1944-04-03 01:00:00", 
"1944-07-31 22:00:00", "1981-03-31 21:00:00", "1981-09-30 20:00:00", 
"1982-03-31 21:00:00", "1982-09-30 20:00:00", "1983-03-31 21:00:00", 
"1983-09-30 20:00:00", "1984-03-31 21:00:00", "1984-09-29 23:00:00", 
"1985-03-30 23:00:00", "1985-09-28 23:00:00", "1986-03-29 23:00:00", 
"1986-09-27 23:00:00", "1987-03-28 23:00:00", "1987-09-26 23:00:00", 
"1988-03-26 23:00:00", "1988-09-24 23:00:00", "1989-03-25 23:00:00", 
"1989-09-23 23:00:00", "1990-03-24 23:00:00", "1990-09-29 23:00:00", 
"1991-03-30 23:00:00", "1997-12-31 22:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00"
), class = "factor"), offSet = c(488160, 3600, 7200, 3600, 10800, 
3600, 3600, 7200, 3600, 7200, 10800, 14400, 10800, 14400, 10800, 
14400, 10800, 14400, 10800, 14400, 10800, 14400, 10800, 14400, 
10800, 14400, 10800, 14400, 10800, 14400, 10800, 10800, 7200, 
10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 10800, 7200, 
10800, 7200, 7200, 3600, 3600, 7200, 7200)), .Names = c("Vilnius", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6", "7", "8", 
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", 
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", 
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", 
"42", "43", "44", "45", "46", "47", "48", "49", "50"), class = "data.frame") }


"Warsaw" <- function() {
structure(list(Warsaw = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, NA, NA, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
21, 22, 23, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 24, 
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 
57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88
)), .Label = c("1915-08-04 22:36:00", "1916-04-30 22:00:00", 
"1916-09-30 23:00:00", "1917-04-16 01:00:00", "1917-09-17 01:00:00", 
"1918-04-15 01:00:00", "1918-09-16 01:00:00", "1922-05-31 22:00:00", 
"1940-06-23 01:00:00", "1942-11-02 01:00:00", "1943-03-29 01:00:00", 
"1943-10-04 01:00:00", "1944-04-03 01:00:00", "1944-09-30 22:00:00", 
"1944-10-04 01:00:00", "1945-04-28 23:00:00", "1945-10-31 22:00:00", 
"1946-04-13 23:00:00", "1946-09-06 22:00:00", "1947-05-03 23:00:00", 
"1947-10-04 22:00:00", "1948-04-17 23:00:00", "1948-10-02 22:00:00", 
"1998-12-31 23:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(3600, 7200, 3600, 7200, 3600, 7200, 7200, 10800, 
7200, 3600, 3600, 3600, 7200, 3600, 7200, 3600, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600)), .Names = c("Warsaw", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128", "129", "130", "131", "132", "133", "134", "135", "136", 
"137", "138", "139", "140", "141", "142", "143", "144", "145", 
"146", "147", "148", "149", "150"), class = "data.frame") }


"Zagreb" <- function() {
structure(list(Zagreb = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105)), .Label = c("1941-04-18 22:00:00", "1942-11-02 01:00:00", 
"1943-03-29 01:00:00", "1943-10-04 01:00:00", "1944-04-03 01:00:00", 
"1944-10-02 01:00:00", "1945-05-08 01:00:00", "1945-09-16 01:00:00", 
"1982-11-26 23:00:00", "1983-03-27 01:00:00", "1983-09-25 01:00:00", 
"1984-03-25 01:00:00", "1984-09-30 01:00:00", "1985-03-31 01:00:00", 
"1985-09-29 01:00:00", "1986-03-30 01:00:00", "1986-09-28 01:00:00", 
"1987-03-29 01:00:00", "1987-09-27 01:00:00", "1988-03-27 01:00:00", 
"1988-09-25 01:00:00", "1989-03-26 01:00:00", "1989-09-24 01:00:00", 
"1990-03-25 01:00:00", "1990-09-30 01:00:00", "1991-03-31 01:00:00", 
"1991-09-29 01:00:00", "1992-03-29 01:00:00", "1992-09-27 01:00:00", 
"1993-03-28 01:00:00", "1993-09-26 01:00:00", "1994-03-27 01:00:00", 
"1994-09-25 01:00:00", "1995-03-26 01:00:00", "1995-09-24 01:00:00", 
"1996-03-31 01:00:00", "1996-10-27 01:00:00", "1997-03-30 01:00:00", 
"1997-10-26 01:00:00", "1998-03-29 01:00:00", "1998-10-25 01:00:00", 
"1999-03-28 01:00:00", "1999-10-31 01:00:00", "2000-03-26 01:00:00", 
"2000-10-29 01:00:00", "2001-03-25 01:00:00", "2001-10-28 01:00:00", 
"2002-03-31 01:00:00", "2002-10-27 01:00:00", "2003-03-30 01:00:00", 
"2003-10-26 01:00:00", "2004-03-28 01:00:00", "2004-10-31 01:00:00", 
"2005-03-27 01:00:00", "2005-10-30 01:00:00", "2006-03-26 01:00:00", 
"2006-10-29 01:00:00", "2007-03-25 01:00:00", "2007-10-28 01:00:00", 
"2008-03-30 01:00:00", "2008-10-26 01:00:00", "2009-03-29 01:00:00", 
"2009-10-25 01:00:00", "2010-03-28 01:00:00", "2010-10-31 01:00:00", 
"2011-03-27 01:00:00", "2011-10-30 01:00:00", "2012-03-25 01:00:00", 
"2012-10-28 01:00:00", "2013-03-31 01:00:00", "2013-10-27 01:00:00", 
"2014-03-30 01:00:00", "2014-10-26 01:00:00", "2015-03-29 01:00:00", 
"2015-10-25 01:00:00", "2016-03-27 01:00:00", "2016-10-30 01:00:00", 
"2017-03-26 01:00:00", "2017-10-29 01:00:00", "2018-03-25 01:00:00", 
"2018-10-28 01:00:00", "2019-03-31 01:00:00", "2019-10-27 01:00:00", 
"2020-03-29 01:00:00", "2020-10-25 01:00:00", "2021-03-28 01:00:00", 
"2021-10-31 01:00:00", "2022-03-27 01:00:00", "2022-10-30 01:00:00", 
"2023-03-26 01:00:00", "2023-10-29 01:00:00", "2024-03-31 01:00:00", 
"2024-10-27 01:00:00", "2025-03-30 01:00:00", "2025-10-26 01:00:00", 
"2026-03-29 01:00:00", "2026-10-25 01:00:00", "2027-03-28 01:00:00", 
"2027-10-31 01:00:00", "2028-03-26 01:00:00", "2028-10-29 01:00:00", 
"2029-03-25 01:00:00", "2029-10-28 01:00:00", "2030-03-31 01:00:00", 
"2030-10-27 01:00:00"), class = "factor"), offSet = c(3600, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 
3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600)), .Names = c("Zagreb", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105"), class = "data.frame") }


"Zurich" <- function() {
structure(list(Zurich = structure(as.integer(c(1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 
102, 103, 104, 105, 106, 107, 108)), .Label = c("1894-05-31 23:30:16", 
"1940-11-01 23:00:00", "1940-12-30 22:00:00", "1941-05-04 01:00:00", 
"1941-10-04 22:00:00", "1942-05-03 01:00:00", "1942-10-03 22:00:00", 
"1980-12-31 23:00:00", "1981-03-29 01:00:00", "1981-09-27 01:00:00", 
"1982-03-28 01:00:00", "1982-09-26 01:00:00", "1983-03-27 01:00:00", 
"1983-09-25 01:00:00", "1984-03-25 01:00:00", "1984-09-30 01:00:00", 
"1985-03-31 01:00:00", "1985-09-29 01:00:00", "1986-03-30 01:00:00", 
"1986-09-28 01:00:00", "1987-03-29 01:00:00", "1987-09-27 01:00:00", 
"1988-03-27 01:00:00", "1988-09-25 01:00:00", "1989-03-26 01:00:00", 
"1989-09-24 01:00:00", "1990-03-25 01:00:00", "1990-09-30 01:00:00", 
"1991-03-31 01:00:00", "1991-09-29 01:00:00", "1992-03-29 01:00:00", 
"1992-09-27 01:00:00", "1993-03-28 01:00:00", "1993-09-26 01:00:00", 
"1994-03-27 01:00:00", "1994-09-25 01:00:00", "1995-03-26 01:00:00", 
"1995-09-24 01:00:00", "1996-03-31 01:00:00", "1996-10-27 01:00:00", 
"1997-03-30 01:00:00", "1997-10-26 01:00:00", "1998-03-29 01:00:00", 
"1998-10-25 01:00:00", "1999-03-28 01:00:00", "1999-10-31 01:00:00", 
"2000-03-26 01:00:00", "2000-10-29 01:00:00", "2001-03-25 01:00:00", 
"2001-10-28 01:00:00", "2002-03-31 01:00:00", "2002-10-27 01:00:00", 
"2003-03-30 01:00:00", "2003-10-26 01:00:00", "2004-03-28 01:00:00", 
"2004-10-31 01:00:00", "2005-03-27 01:00:00", "2005-10-30 01:00:00", 
"2006-03-26 01:00:00", "2006-10-29 01:00:00", "2007-03-25 01:00:00", 
"2007-10-28 01:00:00", "2008-03-30 01:00:00", "2008-10-26 01:00:00", 
"2009-03-29 01:00:00", "2009-10-25 01:00:00", "2010-03-28 01:00:00", 
"2010-10-31 01:00:00", "2011-03-27 01:00:00", "2011-10-30 01:00:00", 
"2012-03-25 01:00:00", "2012-10-28 01:00:00", "2013-03-31 01:00:00", 
"2013-10-27 01:00:00", "2014-03-30 01:00:00", "2014-10-26 01:00:00", 
"2015-03-29 01:00:00", "2015-10-25 01:00:00", "2016-03-27 01:00:00", 
"2016-10-30 01:00:00", "2017-03-26 01:00:00", "2017-10-29 01:00:00", 
"2018-03-25 01:00:00", "2018-10-28 01:00:00", "2019-03-31 01:00:00", 
"2019-10-27 01:00:00", "2020-03-29 01:00:00", "2020-10-25 01:00:00", 
"2021-03-28 01:00:00", "2021-10-31 01:00:00", "2022-03-27 01:00:00", 
"2022-10-30 01:00:00", "2023-03-26 01:00:00", "2023-10-29 01:00:00", 
"2024-03-31 01:00:00", "2024-10-27 01:00:00", "2025-03-30 01:00:00", 
"2025-10-26 01:00:00", "2026-03-29 01:00:00", "2026-10-25 01:00:00", 
"2027-03-28 01:00:00", "2027-10-31 01:00:00", "2028-03-26 01:00:00", 
"2028-10-29 01:00:00", "2029-03-25 01:00:00", "2029-10-28 01:00:00", 
"2030-03-31 01:00:00", "2030-10-27 01:00:00"), class = "factor"), 
offSet = c(3600, 7200, 3600, 7200, 3600, 7200, 3600, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 
7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600, 7200, 3600
)), .Names = c("Zurich", "offSet"), row.names = c("1", "2", 
"3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", 
"15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", 
"26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", 
"37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", 
"48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", 
"59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", 
"70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", 
"81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", 
"92", "93", "94", "95", "96", "97", "98", "99", "100", "101", 
"102", "103", "104", "105", "106", "107", "108"), class = "data.frame") }


# PACIFIC ----------------------------------------------------------------------


"Auckland" <- function() {
structure(list(Auckland = structure(as.integer(c(1, 2, 3, 4, 
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 
114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 
127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 
140)), .Label = c("1927-11-25 14:30:00", "1928-03-03 14:00:00", 
"1928-11-03 14:30:00", "1929-03-02 14:00:00", "1929-10-29 14:30:00", 
"1930-03-15 14:00:00", "1930-10-11 14:30:00", "1931-03-14 14:00:00", 
"1931-10-10 14:30:00", "1932-03-19 14:00:00", "1932-10-08 14:30:00", 
"1933-03-18 14:00:00", "1933-10-07 14:30:00", "1934-04-28 14:00:00", 
"1934-09-29 14:30:00", "1935-04-27 14:00:00", "1935-09-28 14:30:00", 
"1936-04-25 14:00:00", "1936-09-26 14:30:00", "1937-04-24 14:00:00", 
"1937-09-25 14:30:00", "1938-04-23 14:00:00", "1938-09-24 14:30:00", 
"1939-04-29 14:00:00", "1939-09-23 14:30:00", "1940-04-27 14:00:00", 
"1940-09-28 14:30:00", "1974-11-02 14:00:00", "1975-02-22 14:00:00", 
"1975-10-25 14:00:00", "1976-03-06 14:00:00", "1976-10-30 14:00:00", 
"1977-03-05 14:00:00", "1977-10-29 14:00:00", "1978-03-04 14:00:00", 
"1978-10-28 14:00:00", "1979-03-03 14:00:00", "1979-10-27 14:00:00", 
"1980-03-01 14:00:00", "1980-10-25 14:00:00", "1981-02-28 14:00:00", 
"1981-10-24 14:00:00", "1982-03-06 14:00:00", "1982-10-30 14:00:00", 
"1983-03-05 14:00:00", "1983-10-29 14:00:00", "1984-03-03 14:00:00", 
"1984-10-27 14:00:00", "1985-03-02 14:00:00", "1985-10-26 14:00:00", 
"1986-03-01 14:00:00", "1986-10-25 14:00:00", "1987-02-28 14:00:00", 
"1987-10-24 14:00:00", "1988-03-05 14:00:00", "1988-10-29 14:00:00", 
"1989-03-04 14:00:00", "1989-10-07 14:00:00", "1990-03-17 14:00:00", 
"1990-10-06 14:00:00", "1991-03-16 14:00:00", "1991-10-05 14:00:00", 
"1992-03-14 14:00:00", "1992-10-03 14:00:00", "1993-03-20 14:00:00", 
"1993-10-02 14:00:00", "1994-03-19 14:00:00", "1994-10-01 14:00:00", 
"1995-03-18 14:00:00", "1995-09-30 14:00:00", "1996-03-16 14:00:00", 
"1996-10-05 14:00:00", "1997-03-15 14:00:00", "1997-10-04 14:00:00", 
"1998-03-14 14:00:00", "1998-10-03 14:00:00", "1999-03-20 14:00:00", 
"1999-10-02 14:00:00", "2000-03-18 14:00:00", "2000-09-30 14:00:00", 
"2001-03-17 14:00:00", "2001-10-06 14:00:00", "2002-03-16 14:00:00", 
"2002-10-05 14:00:00", "2003-03-15 14:00:00", "2003-10-04 14:00:00", 
"2004-03-20 14:00:00", "2004-10-02 14:00:00", "2005-03-19 14:00:00", 
"2005-10-01 14:00:00", "2006-03-18 14:00:00", "2006-09-30 14:00:00", 
"2007-03-17 14:00:00", "2007-10-06 14:00:00", "2008-03-15 14:00:00", 
"2008-10-04 14:00:00", "2009-03-14 14:00:00", "2009-10-03 14:00:00", 
"2010-03-20 14:00:00", "2010-10-02 14:00:00", "2011-03-19 14:00:00", 
"2011-10-01 14:00:00", "2012-03-17 14:00:00", "2012-10-06 14:00:00", 
"2013-03-16 14:00:00", "2013-10-05 14:00:00", "2014-03-15 14:00:00", 
"2014-10-04 14:00:00", "2015-03-14 14:00:00", "2015-10-03 14:00:00", 
"2016-03-19 14:00:00", "2016-10-01 14:00:00", "2017-03-18 14:00:00", 
"2017-09-30 14:00:00", "2018-03-17 14:00:00", "2018-10-06 14:00:00", 
"2019-03-16 14:00:00", "2019-10-05 14:00:00", "2020-03-14 14:00:00", 
"2020-10-03 14:00:00", "2021-03-20 14:00:00", "2021-10-02 14:00:00", 
"2022-03-19 14:00:00", "2022-10-01 14:00:00", "2023-03-18 14:00:00", 
"2023-09-30 14:00:00", "2024-03-16 14:00:00", "2024-10-05 14:00:00", 
"2025-03-15 14:00:00", "2025-10-04 14:00:00", "2026-03-14 14:00:00", 
"2026-10-03 14:00:00", "2027-03-20 14:00:00", "2027-10-02 14:00:00", 
"2028-03-18 14:00:00", "2028-09-30 14:00:00", "2029-03-17 14:00:00", 
"2029-10-06 14:00:00", "2030-03-16 14:00:00", "2030-10-05 14:00:00"
), class = "factor"), offSet = c(43200, 41400, 43200, 41400, 
43200, 41400, 43200, 41400, 43200, 41400, 43200, 41400, 43200, 
41400, 43200, 41400, 43200, 41400, 43200, 41400, 43200, 41400, 
43200, 41400, 43200, 41400, 43200, 46800, 43200, 46800, 43200, 
46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 
43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 
46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 
43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 
46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 
43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 
46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 
43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 
46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 
43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 
46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 
43200, 46800, 43200, 46800, 43200, 46800, 43200, 46800, 43200, 
46800)), .Names = c("Auckland", "offSet"), row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", 
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", 
"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", 
"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 
"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", 
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", 
"101", "102", "103", "104", "105", "106", "107", "108", "109", 
"110", "111", "112", "113", "114", "115", "116", "117", "118", 
"119", "120", "121", "122", "123", "124", "125", "126", "127", 
"128", "129", "130", "131", "132", "133", "134", "135", "136", 
"137", "138", "139", "140"), class = "data.frame") }


"Honolulu" <- function() {
structure(list(Honolulu = structure(as.integer(c(1, 2, 3, 4, 
5, 6)), .Label = c("1933-04-30 12:30:00", "1933-05-21 11:30:00", 
"1942-02-09 12:30:00", "1945-08-14 23:00:00", "1945-09-30 11:30:00", 
"1947-06-08 12:30:00"), class = "factor"), offSet = c(-34200, 
-37800, -34200, -34200, -37800, -36000)), .Names = c("Honolulu", 
"offSet"), row.names = c("1", "2", "3", "4", "5", "6"), class = "data.frame") }


# ------------------------------------------------------------------------------


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#     iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#     General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#   sources obtained from a few dozens of websites


################################################################################
# FUNCTION:            GENERATION OF TIME SERIES OBJECTS:
#  setClass             S4 Class definition for a 'timeSeries' object
#  timeSeries           Creates a 'timeSeries' object from scratch
#  read.timeSeries      Reads from a spreadsheet and creates a 'timeSeries'
#   as.timeSeries       S3: Creates a dummy 'time Series' from a 'matrix'
#   is.timeSeries       S3: Tests for a 'timeSeries' object
#   print.timeSeries    S3: Print method for a 'timeSeries' object
#   plot.timeSeries     S3: Plot method for a 'timeSeries' object
#   lines.timeSeries    S3: Lines method for a 'timeSeries' object
#   Ops.timeSeries      S3: Arith method for a 'timeSeries' object
#   [.timeSeries        S3: [ method for a 'timeSeries' object
#	head.timeSeries     S3: returns the head of a 'timeSeries' object
#	tail.timeSeries     S3: returns the tail of a 'timeSeries' object
# FUNCTION:            REPRESENTATION OF TIME SERIES OBJECTS:
#  seriesData           Extracts data slot from 'timeSeries' object
#  seriesPositions      Extracts positions slot from 'timeSeries' object
#  start.timeSeries     S3: Extracts start date of a 'timeSeries' object 
#  end.timeSeries       S3: Extracts end date of a 'timeSeries' object 
#  as.vector.timeSeries S3: Converts a univariate 'timeSeries' to a vector
#  as.matrix.timeSeries S3: Converts a 'timeSeries' to a matrix
#  as.data.frame.timeS* S3: Converts a 'timeSeries' to a data.frame
# FUNCTION:            MATHEMATICAL OPERATIONS ON TIME SERIES OBJECTS:
#  applySeries          Applies a function to margins of a 'timeSeries'         
#  cutSeries            Cuts out a piece from a 'timeSeries' object
#  mergeSeries          Merges a 'timeSeries' object with a 'matrix'
#  returnSeries         Computes returns from a 'timeSeries' object
#  revSeries            Reverts a 'timeSeries' object
#  diffSeries     		Differences a 'timeSeries' object
#  lagSeries      		Lags a 'timeSeries' object
# FUNCTION:            DAILY OPERATIONS:
#  alignDailySeries     Aligns a 'timeSeries' object to new positions 
#  ohlcDailyPlot        Plots openhighlowclose bar chart         
################################################################################


################################################################################
# GENERATION OF TIMESERIES OBJECTS:
#   We have defined a 'timeSeries' class which is in many aspects similar
#   to the S-Plus class with the same name, but has also some important
#   differeneces. The class has seven Slots, the 'Data' slot which holds 
#   the time series data in matrix form, the 'position' slot which holds
#   the time/date as a character vector, the 'format' and 'FinCenter'
#   slots which are the same as for the 'timeDate' object, the 'units'
#   slot which holds the column names of the data matrix, and a 'title'
#   and a documentation' slot which hold descriptive character strings.
#   Date and time is managed in the same way as for 'timeDate' objects.


require(methods)


setClass("timeSeries", 
    # A class implemented by Diethelm Wuertz
    
    # Description:
    #   Class representatation for 'timeSeries' Objects.
   
    # CLASS:
    
    representation(
        Data = "matrix",
        positions = "character",
        format = "character",
        FinCenter = "character",      
        units = "character",
        title = "character",
        documentation = "character")    
)
   

# ------------------------------------------------------------------------------


timeSeries =
function (data, charvec, units = NULL, format = "ISO", zone = "GMT", 
FinCenter = myFinCenter, title = NULL, documentation = NULL, ...) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Creates a 'timeSeries' object from scratch.
    
    # Arguments:
    #   data -a 'data frame or a 'matrix' object of numeric data.
    #   charvec - a character vector of dates and times.
    #   units - an optional units string, NULL defaults an empty 
    #       string.
    #   format - the format specification of the input character 
    #       vector.
    #   zone - the time zone or financial center where the data were 
    #       recorded.
    #   FinCenter - a character with the the location of the  
    #       financial center named as "continent/city". 
    #   title - an optional title string, if not specified the inputs 
    #       data name is deparsed.
    #   documentation - optional documentation string.
    
    # Value:
    #   Returns a S4 object of class 'timeSeries'.
    #   positions - these are the POSIX date/time strings created  
    #       by default from the dimnames of the data matrix, or 
    #       alternatively if the data are read from a CSV file, 
    #       the first column is expected to hold the positions, 
    #       and the column name the "format" string.
    
    # Details:
    #    This is a minimal implementation of the SPLUS "timeSeries" 
    #    object.
    
    # Example:
    #   data.mat = matrix(round(rnorm(30),2), 10)
    #   charvec =  paste("2004-01-", c(paste("0", 1:9, sep=""), 10:30), sep="")
    #   timeSeries(data.mat, charvec)
   
    # FUNCTION:

    # Trace:
    if (FinCenter == "") FinCenter = "GMT"
    trace = FALSE
    
    # To Character Vector:
    charvec = as.character(charvec)
    
    # To Matrix:
    data = as.matrix(data)
         
    # Format:
    if (format == "" | format == "ISO") {
        if (nchar(charvec[1]) == 10) 
            format = "%Y-%m-%d" else format = "%Y-%m-%d %H:%M:%S" } 

    # Create 'timeDate' object:     
    timeDates = timeDate(charvec = charvec, format = format, zone = zone, 
        FinCenter = FinCenter) 
        
    # Add Dimnames:
    rownames(data) = format.POSIXlt(timeDates@Data)
    if (is.null(units)) units = paste("TS.", 1:dim(data)[2], sep="")
    colnames(data) = units
    
    # Add title and Documentation:
    if (is.null(title)) title = "Time Series Object"
    doc = paste("Created at", Sys.timeDate()@FinCenter, Sys.timeDate()@Data)
    if (is.null(documentation)) documentation = doc
    
    # Return Value:
    new("timeSeries", 
        Data = as.matrix(data), 
        positions = rownames(data),
        format = timeDates@format,
        FinCenter = timeDates@FinCenter,  
        units = as.character(units), 
        title = as.character(title), 
        documentation = as.character(documentation) )            
}


# ------------------------------------------------------------------------------


read.timeSeries =
function(file, zone = "GMT", FinCenter = "", title = "", 
documentation = "", sep = ";")
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Reads from a spreadsheet and creates a 'timeSeries' object
    
    # Arguments:
    #   file - the filename of a spreadsheet data set from which
    #       to import the data records.
    #   zone - the time zone or financial center where the data were 
    #       recorded.
    #   FinCenter - a character with the the location of the  
    #       financial center named as "continent/city". By default
    #		an empty string which means that internally "GMT" will
    #		be used.
    #   title - an optional title string, if not specified the inputs 
    #       data name is deparsed.
    #   documentation - optional documentation string.
    
    # Value:
    #   Returns a S4 object of class 'timeSeries'.
    
    # Notes:
    #   Note we expect that the header of the spreadsheet file in
    #   the first cell holds the time/date format specification! 
    
    # FUNCTION:
    
    # Financial Center:
    if (FinCenter == "") FinCenter = "GMT"
    
    # Read Data:
	zfile = zip.file.extract(file, "Rdata.zip")
    header = scan(zfile, what = "", nlines = 1, sep = sep, quiet = TRUE)
    x = read.table(zfile, header = TRUE, sep = sep)
    n = dim(x)[2]
    data = as.matrix(x[, 2:n])
    charvec = as.character(as.vector(x[, 1]))
    format = header[1]
    units = header[2:n]
    
    # Create Time Series:
    ans = timeSeries(data, charvec, units, format, zone = "GMT", 
        FinCenter, title = "", documentation = file) 
        
    # For dates only, cut format string:
    if (nchar(ans@positions[1]) == 10) 
        ans@format = substring(ans@format, 1, 8)
        
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


as.timeSeries =
function(x, dimnames = TRUE, format = "") 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Creates a dummy time Series object from a matrix
    
    # Arguments:
    #   x - a 'matrix' object to be converted.
    #   dimnames - a logical, if TRUE the dimension names of the
    #		matrix are assigned to the time series object
    #   format - a character string with the format in POSIX 
    #		notation to be passed to the time series object
    
    # Value:
    #   Returns a S4 object of class 'timeSeries'.
    
    # FUNCTION:
    
    # Time Series Decoration: 
    if (dimnames) {
	    colNames = colnames(x)[-1]
	    rowNames = as.vector(x[, 1])
	    data = as.matrix(x[, -1])}
	else {
    	data = as.matrix(x)
    	rows = dim(data)[1]
    	cols = dim(data)[2]
    	colNames = as.character(1:cols)
    	rowNames = as.character(1:rows) }
    colnames(data) = colNames
	rownames(data) = rowNames 
	    
    # Return Value:
    # new("timeSeries", Data = data, positions = as.character(rowNames), 
    #     format = format, FinCenter = "GMT", units = colNames, 
    #     title = as.character(""), documentation = as.character(""))
    timeSeries(data = data, charvec = as.character(rowNames), 
    	units = colNames, format = format, zone = myFinCenter)
}
   

# ------------------------------------------------------------------------------


is.timeSeries = 
function (object) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Tests for a 'timeSeries' object.
    
    # Arguments:
    #   object - a 'timeSeries' object to be tested.
    
    # Value:
    #   Returns 'TRUE' or 'FALSE' depending on whether its
    #   argument is of 'timeSeries' type or not.
        
    # FUNCTION:
    
    # Check:
    ans = inherits(object, "timeSeries")
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


print.timeSeries =
function(x, ...)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Print method for an S4 object of class "timeSeries"
        
    # Arguments:
    #   x - an object of class "timeSeries"
    
    # Value:
    #   Prints a 'timeSeries' object.
        
    # FUNCTION:
        
    # Return Value:
    print.default(x@Data)
}

  
# ------------------------------------------------------------------------------


plot.timeSeries =
function(x, reference.grid = TRUE, lty = 1, ...) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Plot method for an S4 object of class "timeSeries"
        
    # Arguments:
    #   x - a "timeSeries" object
    #   # minor.tick - adds minor ticks, a numeric vector of three 
    #   #   elements. The first and second are integers and number
    #   #   additional tick on the x and y axis repectively. The
    #   #   third elment is the tick.ratio by default half of the
    #   #   length of the major ticks. [ Not yet implemented ]
    #   reference.grid - a logical value. Should a grid be
    #       added to the plot?
        
    # Value:
    #   Plots a 'timeSeries' object.
    
    # FUNCTION:
    
    # Convert and use its[requires Hmisc] ...
    sink("@sink@")
    required = require(its) 
    sink()
    unlink("@sink@")
    # 
    
    # Transform:
    x.its = its(x@Data, dates = as.POSIXct(seriesPositions(x)), 
    	format = x@format)
    	   	
    # Plot:
    plot(x.its, ltypvec = lty, ...)
    if (reference.grid) grid()
   
    # Return Value:
    invisible(x)
}


# ------------------------------------------------------------------------------


lines.timeSeries =
function(x, ...) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Plot method for an S4 object of class "timeSeries"
        
    # Arguments:
    #   x - a "timeSeries" object
    #   reference.grid - a logical value. Should a grid be
    #       added to the plot?
        
    # Value:
    #   Plots a 'timeSeries' object.
    
    # FUNCTION:
   
    # Add to Plot:
    lines(x = as.POSIXct(seriesPositions(x)), y = x@Data, ...)
            
    # Return Value:
    invisible(x)
}


# ------------------------------------------------------------------------------
 

Ops.timeSeries = 
function(e1, e2)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Uses group 'Ops' generic functions for 'timeSeries' objects
    
    # Arguments:
    #   e1, e2 - two objects of class 'timeSeries'.
    
    # Value:
    #   Returns an object of class 'timeSeries'.

    # FUNCTION:
    
    # Save:
    s1 = e1; s2 = e2
    
    # Which one is a 'timeSeries' object?
    i1 = inherits(e1, "timeSeries")
    i2 = inherits(e2, "timeSeries")
    
    # Match positions and FinCenter?
    if (i1 && i2) {
        if (!identical(e1@positions, e2@positions)) 
            stop("positions slot must match")
        if (!identical(e1@FinCenter, e2@FinCenter)) 
            stop("FinCenter slot must match") }
            
    # Extract Data Slot:
    if (i1)  e1 = e1@Data
    if (i2)  e2 = e2@Data
        
    # Compute:
    s = NextMethod(.Generic)
    
    # Make timeSeries:
    if (i1) { s1@Data = s; s = s1 }
    if (!i1 && i2) { s2@Data = s; s = s2 } 
    if (i1 && !i2) s@units = s1@units
    if (!i1 && i2) s@units = s2@units
    if (i1 && i2) s@units = paste(s1@units, "_", s2@units, sep ="")
    colnames(s@Data) = s@units
    
    # Return Value:
    s
}
    
    
# ------------------------------------------------------------------------------


"[.timeSeries" =
function(x, i = min(1, nrow(x@Data)):nrow(x@Data), 
j = min(1, ncol(x@Data)):ncol(x@Data))
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Extracts or replaces subsets from 'timeSeries' objects
    
    # Arguments:
    #   x - a 'timeSeries' object
    #   i, j - subset indexes.
    
    # Value:
    #   Returns a subset from an object 'timeSeries'.
    
    # FUNCTION:
    
    # Check Timezone:
    if (Sys.timezone() != "GMT") warning("Set timezone to GMT!")
    
    # Subsets:
    if(missing(i)) { i <- min(1, nrow(x@Data)):nrow(x@Data) }
    if(missing(j)) { j <- min(1, ncol(x@Data)):ncol(x@Data) }
        
    # Subset:
    subx <- x@Data[i, j, drop = FALSE]
    x@Data = subx
    x@positions = x@positions[i]
    x@units = colnames(subx)
    
    # Return Value:
    x
}         


# ------------------------------------------------------------------------------


revSeries =
function(x) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Time revert 'timeSeries' objects
    
    # Arguments:
    #   x - a 'timeSeries' object.
    
    # Value:
    #   Returns a reverted object of class 'timeSeries'.
    
    # FUNCTION:
    
    # Revert:
    x@Data = apply(x@Data, 2, rev)
    x@positions = rev(x@positions)
    
    # Return Value:
    x
}


# ------------------------------------------------------------------------------


diffSeries = 
function(x, lag = 1, diff = 1, trim = FALSE, pad = NA) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Difference 'timeSeries' objects.
    
    # Arguments:
    #   x - a 'timeSeries' object.
    #   lag - an integer indicating which lag to use. 
    #       By default 1.
    #   diff - an integer indicating the order of the difference.
    #       By default 1.
    #   trim - a logical. Should NAs at the befinning of the
    #       series be removed?
    #   pad - a umeric value with which NAs should be replaced
    #       at the befinning of the series.

    # Value:
    #   Returns a differenced object of class 'timeSeries'.
    
    # FUNCTION:
        
    # Convert:
    y = as.data.frame(x)
    y = as.matrix(x)
        
    # Check NAs:
    if (any(is.na(y))) stop("NAs are not allowed in time series")
        
    # Difference:
    z = diff(y, lag = lag, difference = diff)
        
    # Trim:
    if (!trim) {
        diffNums = dim(y)[1] - dim(z)[1]
        zpad = matrix(0*y[1:diffNums, ] + pad, nrow = diffNums)
        rownames(zpad) = rownames(y)[1:diffNums] 
        z = rbind(zpad, z)}
            
    # Return Value:
    timeSeries(data = z, charvec = rownames(z), units = colnames(z),
        format = x@format, FinCenter = x@FinCenter,
        title = x@title, documentation = x@documentation)
}


# ------------------------------------------------------------------------------


lagSeries = 
function(x, k = 1, trim = FALSE, colNames = NULL)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Lags 'timeSeries' objects.
    
    # Arguments:
    #   x - a 'timeSeries' object.
    #   k - an integer indicating which lag to use. 
    #       By default 1.
    #   trim - a logical. Should NAs at the befinning of the
    #       series be removed? 
    
    # Value:
    #   Returns a lagged object of class 'timeSeries'.
 
    # FUNCTION:
    
    # Internal Function:
    tslagMat = function(x, k = 1) {
        # Internal Function:
        tslag1 = function(x, k) {
            y = x
            if (k > 0) y = c(rep(NA, times = k), x[1:(length(x)-k)])
            if (k < 0) y = c(x[(-k+1):length(x)], rep(NA, times = -k))
            y }
        # Bind:
        ans = NULL
        for (i in k) {
            ans = cbind(ans, tslag1(x, i)) }
        # As Vector:
        if (length(k) == 1) ans = as.vector(ans)
        # Return Value:
        ans }
        
    # Convert:
    y = as.data.frame(x)
    y = as.matrix(y)
    Dim = dim(y)[2]
    
    # Lag on each Column:
    z = NULL
    for (i in 1:Dim) {
    	ts = tslagMat( y[, i], k = k)     #, trim = FALSE)
        z = cbind(z, ts) }
    
    # Add Names:
    rownames(z) = rownames(y)    
    colnames(z) = rep(colnames(y), each = length(k)) 
        
    # Return Value:
    ans = timeSeries(data = z, charvec = rownames(z), units = colnames(z),
        format = x@format, FinCenter = x@FinCenter,
        title = x@title, documentation = x@documentation)
  	
    # Trim:
    if (trim) {
	  	idx = !is.na(apply(ans@Data, 1, sum))
	  	ans = ans[idx,] }
	  	
	# Augment Colnames:
	a = colnames(z)
	kcols = rep(k, times = ncol(y))
	b = paste("[", kcols, "]", sep="") 
	ab = paste(a, b, sep = "")
	colnames(ans@Data) <- ab
	
	# Return Value:
  	ans      
}


# ------------------------------------------------------------------------------


head.timeSeries = 
function(x, ...)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   returns the head of a 'timeSeries' objects
    
    # Arguments:
    #   x - a 'timeSeries' object.
    #   length - an integer indicating the length of the head 
    #       By default 5.
    
    # Value:
    #   Returns the head of an object of class 'timeSeries'.
 
    # FUNCTION:
    
    # Head:
    length = 3
    ans = x[1:length, ]
    colnames(ans@Data) = colnames(x@Data)
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


tail.timeSeries = 
function(x, ...)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   returns the tail of a 'timeSeries' object
    
    # Arguments:
    #   x - a 'timeSeries' object.
    #   length - an integer indicating the length of the tail 
    #       By default 5.
    
    # Value:
    #   Returns the tail of an object of class 'timeSeries'.
 
    # FUNCTION:
    
    # Head:
    length = 3
    nRows = nrow(x@Data)
    ans = x[(nRows+1-length):nRows, ]
    colnames(ans@Data) = colnames(x@Data)
    
    # Return Value:
    ans
}
     

################################################################################
# REPRESENTATION OF TIMESERIES OBJECTS:
#   This is a collection of functions to represent 'timeSeries' objects
#   in different forms. Included are functions to extract the data slot 
#   from 'timeSeries' object, to extract the position slot, to extracts 
#   the start and end date of a 'timeSeries' object, and to convert an 
#   an univariate "timeSeries" to a vector or 'timeSeries' objects to a
#   matrix or data frame.


seriesData =
function(object)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #    Returns the series Data of an ordered data object.
    
    # Arguments:
    #   object - a 'timeSeries' object
    
    # Value:
    #    Returns an object of class 'matrix'.
    
    # FUNCTION:
    
    # Test:
    if(class(object) != "timeSeries") stop("Object is not a time Series")
    
    # Get Data Slot:
    ans = object@Data
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


seriesPositions =
function(object)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Extracts the positions of a 'timeSeries' objects and 
    #   converts them to a 'timeDate' object.
    
    # Arguments:
    #   object - a 'timeSeries' object
    
    # Value:
    #   Returns 'timeSeries' positions as 'timeDate' objects.
    
    # FUNCTION:
        
    # Create 'timeDate' Object:
    ans = timeDate(charvec = object@positions, format = object@format, 
        zone = object@FinCenter, FinCenter = object@FinCenter)   
        
    # Return Value:
    ans   
}


# ------------------------------------------------------------------------------


start.timeSeries =
function(x, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Extracts the first position as a character string
    
    # Arguments:
    #   x - a 'timeSeries' object.
    #   ... - arguments passed to other methods.
    
    # Value:
    #   Returns the first time/date as an object of class 'timeDate'.
  
    # FUNCTION:
    
    # S3 Method:
    ans = start.timeDate(seriesPositions(x))

    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


end.timeSeries =
function(x, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Extracts the last position as a character string
    
    # Arguments:
    #   x - a 'timeSeries' object.
    #   ... - arguments passed to other methods.
    
    # Value:
    #   Returns the last time/date as an object of class 'timeDate'.
    
    # FUNCTION:
    
    # S3 Method:
    ans = end.timeDate(seriesPositions(x))

    # Return Value:
    ans
}


# ******************************************************************************


as.vector.timeSeries =
function(x, mode = "any") 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Converts a univariate "timeSeries" to a vector

    # Arguments:
    #   x - a 'timeSeries' object
    
    # Value:
    #   Returns the data slot of 'timesSeries' object as a vector.
        
    # FUNCTION:
        
    # Check:
    if (class(x) != "timeSeries") 
        stop("x is not a timeSeries object!")
    if (dim(as.matrix(x))[[2]] != 1) 
        stop("x is not a univariate timeSeries object!")
        
    # Convert:
    rownames = dimnames(x)[[1]]
    x = x@Data
    class(x) = "numeric"
    x = as.vector(x)
    names(x) = rownames
    
    # Return Value:
    x 
}
    

# ------------------------------------------------------------------------------


as.matrix.timeSeries =
function(x) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Converts a multivariate "timeSeries" to a matrix

    # Arguments:
    #   x - a 'timeSeries' object
    
    # Value:
    #   Returns the data slot of a 'timesSeries' object as a vector.
    
    # FUNCTION:
    
    # Check:
    if (class(x) != "timeSeries") stop("x is not a timeSeries object!")
        
    # Convert:
    ans = as.matrix(x@Data) # is matrix
        
    # Return Value:
    ans 
}
    

# ------------------------------------------------------------------------------


as.data.frame.timeSeries =
function(x, row.names = NULL, optional = NULL) 
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Converts a multivariate "timeSeries" to a data.frame
    
    # Arguments:
    #   x - a 'timeSeries' object
    #	row.names, optional - not used
    
    # Value:
    #   Returns the data slot of a 'timesSeries' object as a data frame.
    
    # FUNCTION:
    
    # Check:
    if (class(x) != "timeSeries") stop("x is not a timeSeries object!")
        
    # Convert:
    dimNames = dimnames(x@Data)
    ans = as.matrix(x@Data) 
    dimnames(ans) = dimNames
    ans = as.data.frame(ans)
    
    # Return Value:
    ans
}
    

################################################################################
# MATHEMATICAL OPERATIONS ON TIMESERIES OBJECTS:
#   This is a collection of functions to perform mathematical operations
#   on 'timeSeries' objects. Included are functions to apply a function 
#   to margins of a 'timeSeries', to cut out a piece from a 'timeSeries' 
#   object, to ggregates and coursene a 'timeSeries' object, to merge 
#   a 'timeSeries' object with a 'matrix', and to compute returns from 
#   a 'timeSeries' object.


applySeries =
function(x, from = NULL, to = NULL, FUN = colMeans, colNames = NULL, ...)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Apply a function to the margins of a 'timeSeries' object
    
    # Details:
    #   This function can be used to aggregate and coursen a 
    #   'timeSeries' object.
    
    # Arguments:
    #   x - a 'timeSeries' object to be aggregated
    #   from, to - two 'timeDate' position vectors which size the 
    #       blocks
    #   MARGIN - a vector giving the subscripts which the function 
    #       will be applied over. '1' indicates rows, '2' indicates 
    #       columns, 'c(1,2)' indicates rows and columns.
    #   FUN - function to use for aggregation, by default 'sum'
    #   include.from, include.to - two logicals, should the
    #       endpoints of the investigation be included? By 
    #       default, the starting point is included, the endpoint 
    #       not.
    #   colNames - a character vector with column names, allows to 
    #       overwrite the column names of the input 'timeSeries'
    #       object.
    
    # Value:
    #   Returns a S4 object of class 'timeSeries'.
    
    # Notes:
    #   The size of the 'moving' window and the selection of an
    #   'adj'-acent endpoint are not needed, all the information
    #   is kept in the 'from' and 'to' position vectors.
  
    # FUNCTION:
    
    # Check object:
    if (class(x) != "timeSeries") stop("s is not a timeSeries object")
    
    # Function:
    fun = match.fun(FUN)
    
    # Blocks:
    j.pos = as.integer(julian(seriesPositions(x)))
    j.from = as.integer(julian(from))
    j.to = as.integer(julian(to))
    
    # Iterate:
    y = x@Data
    pos = seriesPositions(x)
    rowNames = rownames(x@Data)
    rowBind = NULL
    for (i in 1:from@Dim) {
        test = (j.pos >= j.from[i] & j.pos <= j.to[i])
        cutted = y[test, ]
        ### if (sum(test)>0) rownames(cutted) <- rowNames[test]
        ans = fun(cutted, ...)
        rowBind = rbind(rowBind, ans) 
    }
    rownames(rowBind) = as.character(to)
    if (is.null(colNames)) {
        units = x@units }
    else {
        units = colNames }
    
    # Return Value:
    timeSeries(data = rowBind, charvec = as.character(to), units = units, 
        format = x@format, zone = "GMT", FinCenter = x@FinCenter, 
        title = x@title, documentation = x@documentation, ...)       
}   


# ------------------------------------------------------------------------------


cutSeries = 
function(x, from, to)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Cuts out a piece from a 'timeSeries' object.
    
    # Arguments:
    #   x - a 'timeSeries' object
    #   from, to - two 'timeDate' position vectors which size the 
    #       blocks
    
    # Value:
    #   Returns a S4 object of class 'timeSeries'.
    
    # FUNCTION:
    
    # Cut:
    from = timeDate(from)
    to = timeDate(to)
    Positions = seriesPositions(x)
    Units = x@units
    colNames = colnames(x@Data)
    test = (Positions >= from & Positions <= to)
    Data = as.matrix(x@Data)[test, ]
    Data = as.matrix(Data)
    
    # Replace Data Slot:
    x@Data = Data
    x@positions = x@positions[test]
    x@units = Units
    colnames(x@Data) = colNames
    
    # Return Value:
    x
}

    
# ------------------------------------------------------------------------------


mergeSeries = 
function(x, y, units = NULL)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Merges a 'timeSeries' with a 'matrix' object 
    
    # Arguments:
    #   x - a 'timeSeries' object
    #   y - a numeric matrix with the same number of rows as x
    
    # Value:
    #   Returns a S4 object of class 'timeSeries'.
    
    # FUNCTION:
    
    # Test Input:
    if (class(x) != "timeSeries") stop("x must be a timeSeries")
    if (!is.matrix(y)) stop("y must be a matrix")
    xRows = dim(x@Data)[1]
    yRows = dim(as.matrix(y))[1]
    if (xRows != yRows) stop("x and y must be of same length")
    
    # Bind Data:
    x@Data = cbind(x@Data, y)
    
    # Add Column Names:
    if (is.null(colnames(y))) 
        colnames(y) <- paste("Y", 1:(dim(y)[2]), sep="")
    colnames(x@Data) <- c(x@units, colnames(y))
    if (!is.null(units)) {
    	x@units = units
    	colnames(x@Data) <- units }
    	
    
    # Return Value:
    new("timeSeries", 
        Data = x@Data, 
        positions = x@positions, 
        format = as.character(x@format), 
        FinCenter = as.character(x@FinCenter),
        units = colnames(x@Data), 
        title = as.character(x@title), 
        documentation = as.character(x@documentation) )          
}


# ------------------------------------------------------------------------------


returnSeries =
function(x, type = c("continuous", "discrete"), percentage = FALSE, 
trim = TRUE, digits = 4)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Computes returns from a financial price series
    
    # Arguments:    
    #   x - a univariate or multivariate 'timeSeries' object or a  
    #       numeric vector or matrix.
    #   type - a character string specifying how to compute the
    #       returns. Valid choices are: "continuous" and "discrete". 
    #       For the default type = "continuous", the returns are 
    #       calculated as the logarithm differences, otherwise if 
    #       type = "discrete", the returns are calculated as 
    #       percentage changes. 
    #   percentage - by default FALSE, if TRUE the series will be  
    #       expressed in % changes.
    #   trim - a logical flag, by default TRUE, the first missing 
    #       observation in the return series will be removed. 

    # Value:
    #   Returns a S4 object of class 'timeSeries'.
    
    # FUNCTION:
    
    # Type:
    type = type[1]
    
    # Internal Function for One Column Object:
    getReturnsForOneColumn =
    function(x = x, type = type, percentage = percentage) {
        # Object has to be a vector:
        x = as.vector(x)
        # Continuous: Calculate Log Returns:
        if (type == "continuous") { 
                x = c(NA, diff(log(x))) }   
        # Discrete: Calculate Returns:
        if (type == "discrete") { 
            x = c(NA, diff(c(x, NA))/x)[-(length(x)+1)] }   
        # Percentage Return ?
        if (percentage) { x = x*100 }
        # Return Value:
        x }
        
    # Result:
    if (class(x) == "timeSeries") {
        y = seriesData(x)
        ans = NULL
        for ( i in 1:(dim(y)[[2]]) ) {
            ans = cbind(ans, getReturnsForOneColumn(x = y[,i], 
                type = type, percentage = percentage)) }
        rownames(ans) = rownames(y)
        colnames(ans) = colnames(y)
        ans = new("timeSeries", 
            Data = as.matrix(ans), 
            positions = as.character(x@positions), 
            format = as.character(x@format), 
            FinCenter = as.character(x@FinCenter), 
            units = as.character(x@units), 
            title = as.character(x@title), 
            documentation = as.character(x@documentation) ) }
    else {  
        x = as.vector(x)        
        ans = getReturnsForOneColumn(x = x, type = type, 
            percentage = percentage) }
            
    # Trim:
    if (trim) ans = ans[-1, ]
    if (percentage) digits = digits - 2
    ans@Data = round(ans@Data, digits = digits)
    
    # Return Value:
    ans
}


################################################################################


alignDailySeries = 
function (x, method = c("before", "after", "interp", "fillNA"), 
include.weekends = FALSE) 
{	# A function implemented by Diethelm Wuertz
    
    # Description:
    #   Aligns an univariate 'timeSeries' object to new positions
    
    # Arguments:
    #   x - an object of class "timeSeries".
    #   method - 
    #       "before" - use the data from the row whose position is
    #           just before the unmatched position; 
    #       "after" - use the data from the row whose position is
    #           just after the unmatched position; 
    #       "linear" - interpolate linearly between "before" and 
    #           "after". 
    #       "fillNA" - fill missing days with NA values
    #   include.weekends - a logical value. Should weekend dates be 
    #       included or removed?
    
    # FUNCTION:
    
	# Internal Function
	# Univariate Time Series Alignment:
	alignDailySeries.OneColumn = 
	function (x, method = method, include.weekends = include.weekends) {
		# Settings:
		units = x@units
		FinCenter = x@FinCenter
		# Units:
		myUnits <<- "days"
		# Fill with NAs:
		if (method == "fillNA") {
		    colsX = 1
		    dtCount = as.integer(julian(seriesPositions(x)))
		    cbind(dtCount, x@Data)
		    newX = rep(NA, times = colsX * (max(dtCount) - min(dtCount) + 1))
		    newX = matrix(newX, ncol = colsX)
		    index = dtCount - min(dtCount) + 1
		    newX[index, ] = x@Data
		    colnames(newX) = colnames(x@Data)
		    newPos = (min(dtCount):max(dtCount)) * 24 * 3600
		    class(newPos) = "POSIXct"
		    newPos = as.POSIXlt(newPos)
		    td = timeSeries(newX, newPos, units = colnames(newX), 
		        zone = x@FinCenter, FinCenter = x@FinCenter)}
		# Interpolate with real Values:
		else {
			# Wich method ?
		    if (method == "interp") {
		        method = "linear"
		        f = 0.5 }
		    if (method == "before") {
		        method = "constant"
		        f = 0 }
		    if (method == "after") {
		        method = "constant"
		        f = 1 }
		    # Get Positions and Data:
		    positions = seriesPositions(x)
		    u = as.integer(julian(positions))
		    v = as.vector(x@Data[, 1])
		    # Approximate:
	        #   method - specifies the interpolation method to be used.  
	        #       Choices are "linear" or "constant".
	        #   f - For method="constant" a number between 0 and 1 inclusive,
	        #       indicating a compromise between left- and right-continuous
	        #       step functions. If 'y0' and 'y1' are the values to the left
	        #       and right of the point then the value is 'y0*(1-f)+y1*f' so
	        #       that 'f=0' is right-continuous and 'f=1' is left-continuous.    
        	x = u[1]:u[length(u)]
		    y = approx(u, v, xout = x, method = method, f = f)$y
		    # Create timeSeries:
		    poschar = as.character(positions)
		    td = timeSeries(y, timeSequence(from = poschar[1], 
		    	to = poschar[length(poschar)], FinCenter = FinCenter, 
		    	format = "%Y-%m-%d"), FinCenter = FinCenter)
		    td@format = "%Y-%m-%d" }
		# Handle Weekends:
		if (!include.weekends) {
		    # Internal Functions:
		    is.weekday = function(x) {
		        # x - a 'timeDate' object
		        wday = as.POSIXlt(as.POSIXct(x))$wday
		        return(!(wday == 0 | wday == 6)) }
		    # Test:
		    test = is.weekday(seriesPositions(td))
		    td@Data = as.matrix(td@Data[test, 1])
		    td@positions = td@positions[test] }
		# Units:
		td@units = units
		colnames(td@Data) = units
		ans = td
		# Return Value:
		ans }
		
	# First Column:
	ans = alignDailySeries.OneColumn(x = x[, 1], method = method, 
		include.weekends = include.weekends)
		
	# Next Columns:
	DimX = dim(x@Data)[2]
	if ( DimX > 1 ) {
		for ( i in 2:DimX ) {
			ans.add = alignDailySeries.OneColumn(x = x[, i], 
				method = method, include.weekends = include.weekends)
			ans = mergeSeries(ans, ans.add@Data) }			}
	
	# Return Value:
	ans
   
}


# ------------------------------------------------------------------------------


ohlcDailyPlot =
function(x, volume = TRUE, colOrder = c(1:5), units = 1e6, xlab = 
c("Date", "Date"), ylab = c("Price", "Volume"), main = c("O-H-L-C", "Volume"), 
grid.nx = 7, grid.lty = "solid", ...) 
{	# A function implemented by Diethelm Wuertz
    
	# Description:
	#	Plots openhighlowclose bar chart 
	
	# Reference:
	#	Build on top of Adrian Trapletti's plotOHLC()
	#	function from his R-package "tseries".
	
	# FUNCTION:
	
	# Units:
	myUnits <<- "days"
	
    # Internal Function:
    addDailyNA = function(x) {
        # Fill:
        colsX = 5
        dtCount = as.integer(julian(seriesPositions(x)))
        cbind(dtCount, x@Data)
        newX = rep(NA, times = colsX*(max(dtCount) - min(dtCount) + 1))
        newX = matrix(newX, ncol = colsX)
        index = dtCount - min(dtCount) + 1
        newX[index, ] = x@Data
        colnames(newX) = colnames(x@Data)
        newPos = (min(dtCount):max(dtCount)) * 24 * 3600
        class(newPos) = "POSIXct"
        newPos = as.POSIXlt(newPos) 
        # New Daily Time Series:
        ans = timeSeries(newX, newPos, units = colnames(newX), 
            zone = x@FinCenter, FinCenter = x@FinCenter)
        # Return Value:
        ans }
     
    # Next:   
    x.filled = addDailyNA(x[, colOrder])
    jul = as.integer(julian(seriesPositions(x.filled)))
    X = ts(x.filled@Data[, 1:4], start = min(jul), end = max(jul))
    
    # plotOHLC - require ( tseries ) :
    plotOHLC = function (x, xlim = NULL, ylim = NULL, xlab = "Time", 
    ylab, col = par("col"), bg = par("bg"), axes = TRUE, frame.plot = 
    axes, ann = par("ann"), main = NULL, date = c("calendar", "julian"), 
    format = "%Y-%m-%d", origin = "1899-12-30", ...) {
	    if ((!is.mts(x)) || (colnames(x)[1] != "Open") || (colnames(x)[2] != 
	        "High") || (colnames(x)[3] != "Low") || (colnames(x)[4] != 
	        "Close")) stop("x is not a open/high/low/close time series")
	    xlabel <- if (!missing(x)) deparse(substitute(x)) else NULL
	    if (missing(ylab)) ylab <- xlabel
	    date <- match.arg(date)
	    time.x <- time(x)
	    dt <- min(lag(time.x) - time.x)/3
	    if (is.null(xlim)) xlim <- range(time.x)
	    if (is.null(ylim)) ylim <- range(x[is.finite(x)])
	    plot.new()
	    plot.window(xlim, ylim, ...)
	    segments(time.x, x[, "High"], time.x, x[, "Low"], col = col[1], bg = bg)
	    segments(time.x - dt, x[, "Open"], time.x, x[, "Open"], col = col[1], 
	        bg = bg)
	    segments(time.x, x[, "Close"], time.x + dt, x[, "Close"], 
	        col = col[1], bg = bg)
	    if (ann) title(main = main, xlab = xlab, ylab = ylab, ...)
	    if (axes) {
	        if (date == "julian") {
	            axis(1, ...)
	            axis(2, ...) }
	        else {
	            n <- NROW(x)
	            lab.ind <- round(seq(1, n, length = 5))
	            D <- as.vector(time.x[lab.ind] * 86400) + as.POSIXct(origin, 
	                tz = "GMT")
	            DD <- format.POSIXct(D, format = format, tz = "GMT")
	            axis(1, at = time.x[lab.ind], lab = DD, ...)
	            axis(2, ...) } }
	    if (frame.plot) box(...) }
	
	# Plot OHLC: 
    plotOHLC(X, origin = "1970-01-01", xlab = xlab[1], ylab = ylab[1])
    print(axTicks(1))
    print(axTicks(2))
    title(main = main[1])
    grid(nx = grid.nx, ny = NULL, lty = grid.lty, ...)
    
    # Include Volume?
    if (volume) {
        Volume = x[, 5]/units
        plot(Volume, reference.grid = FALSE, type = "h", 
            xlab = xlab[2], ylab = ylab[2])
        title(main = main[2])
        grid(nx = grid.nx, ny = NULL, lty = grid.lty, ...) }
    
    # Return value:
    invisible()  
}   

   
# ------------------------------------------------------------------------------ 


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA


# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#     iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#     General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#   sources obtained from a few dozens of websites


################################################################################
# FUNCTION:           HOLIDAY CALENDAR FUNCTIONS:
#  easter              Returns date of easter or related feasts as 'sdate'
#  holiday             Returns a holiday date of G7 and CH as 'sdate'
# FUNCTION:           TIME DATE HOLIDAY CALENDARS:
#  holiday.NYSE        Returns 'timeDate' object for full-day NYSE holidays
# FUNCTION:           DESCRIPTION:
#  on.or.after         Computes date in month that is a nday ON OR AFTER date
#  on.or.before        Computes date in month that is a nday ON OR BEFORE date
#  nth.of.nday         Computes nth ocurrance of a nday in year/month
#  last.of.nday        Computes the last nday in year/month
# FUNCTION:           DESCRIPTION:
#  sjulian             Computes Julian day numbers from ISO-8601 dates
#  sdate               Computes ISO-8601 dates from Julian day numbers
#  sday.of.week        Computes day of the week for ISO-8601 dates 
#  sleap.year          Returns TRUE/FALSE if dates belong to leap years or not
#  print.sdate         Prints method for objects of class "sdate"
# FUNCTION:           DESCRIPTION:
#  fjulian             Transform formatted dates to julian day numbers
# FUNCTION:           DESCRIPTION:
#  .julian             Implements Splus like julian
#  month.day.year      Implements Splus like month.day.year
#  leap.year           Implements Splus like leap.year
#  day.of.week         Implements Splus like day.of.week
################################################################################


################################################################################
# HOLIDAY FUNCTIONS:
#   This is a family of functions dealing with holidays, which I have
#   implemented several years ago. There is a function named 'easter'
#   which allows to calculate the date of easter and related feasts.
#   In addition there are more than 100 functions to calculate the dates
#   of holidays in the G7 countries and Switzerland. Have a look in the  
#   database located in the data directory. In the ASCII database you can 
#   add your personal entries. Furthermore, the function 'holiday.NYSE'
#   is an example how to write your own holiday calendar functions.


easter = 
function(year = currentYear, shift = 0)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Returns dates of easter or related feasts
    
    # Arguments:
    #   year - an integer variable or vector for the year(s)
    #       ISO-8601 formatted as "CCYY" where easter or
    #       easter related feasts should be computed.
    #   shift - the number of days shifted from the easter
    #       date. Negative integers are allowed.
    
    # Value:
    #   Returns the date of Easter shifted by 'shift' days, 
    #   "sdate" formatted, an integer of the form CCYYMMDD.
    
    # Details:
    #   By default the date of Easter is calculated and returned
    #   in ISO format CCYYMMDD as an integer. Changing shift you
    #   can calculate easter related feasts, e.g. "shift=1" returns
    #   the date of Easter Monday, or "shift=-2" returns the date
    #   of Good Friday.
    
    # Examples:
    #   currentYear         # prints current year as integer
    #   easter()            # date of easter this year
    #   easter(2000:2009))  # easter for the 2k decade  
    #   timeDate(easter())  # Convert to timeDate
    #   class(easter())     # what class?
    
    # Notes:
    #   The variable currentYear is set in ".FirstLib"
    #   Calls "month.day.year" and "sjulian"
    
    # FUNCTION:
        
    # Internal Function:
    easter.sunday = function(year) {
        # This algorithm holds for any year in the Gregorian Calendar, 
        # which (of course) means years including and after 1583
        a = year%%19
        b = year%/%100
        c = year%%100
        d = b%/%4
        e = b%%4
        f = (b+8)%/%25
        g = (b-f+1)%/%3
        h = (19*a+b-d-g+15)%%30
        i = c%/%4
        k = c%%4
        l = (32+2*e+2*i-h-k)%%7
        m = (a+11*h+22*l)%/%451
        easter.month = (h+l-7*m+114)%/%31 
        p = (h+l-7*m+114)%%31
        easter.day = p+1 
        # Return Value:
        year*10000 + easter.month*100 + easter.day }
    
    # Shift and Compute Easter:
    mdy = month.day.year(sjulian(easter.sunday(year))+shift)
    ans = as.integer(mdy$year*10000 + mdy$month*100 + mdy$day)
    
    # Classify as simple integer ISO date format CCYYMMDD
    class(ans) = "sdate" 
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


holiday = 
function(year = currentYear, holiday = "Easter")
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Returns the data of a holiday, year may be a vector.
    
    # Arguments:
    #   year - an integer variable or vector for the year(s) ISO-8601 
    #       formatted as "CCYY" as integers.
    #   holiday - a character string naming the holiday. By default
    #       "Easter". Allowable names are the holidays in the G7 
    #       countries and Switzerland.
    
    # Value:
    #   Returns the date of a listed holiday for the selected
    #   "year"(s), "sdate" formatted, an integer of the form CCYYMMDD.
    
    # Example:
    #   holiday()
    #   holiday(2000:2009, "USLaborDay")
    #   class(holiday())
    
    # List of Valid Holiday Character Strings:
    #   The following ecclestial and public holidays in
    #       the G7 countries and Switzerland are available:
    #   Holidays Related to Easter:
    #       Septuagesima, Quinquagesima, AshWednesday, PalmSunday,
    #       GoodFriday,  EasterSunday, Easter, EasterMonday, 
    #       RogationSunday, Ascension, Pentecost, PentecostMonday, 
    #       TrinitySunday CorpusChristi. 
    #   Holidays Related to Christmas:
    #       ChristTheKing, Advent1st, Advent1st, Advent3rd, 
    #       Advent4th, ChristmasEve, ChristmasDay, BoxingDay, 
    #       NewYearsDay. 
    #   Other Ecclestical Feasts:
    #       SolemnityOfMary, Epiphany, PresentationOfLord, 
    #       Annunciation, TransfigurationOfLord, AssumptionOfMary, 
    #       AssumptionOfMary, BirthOfVirginMary, CelebrationOfHolyCross, 
    #       MassOfArchangels, AllSaints, AllSouls. 
    #   CHZurich - Public Holidays:
    #       CHBerchtoldsDay, CHSechselaeuten, CHAscension, 
    #       CHConfederationDay, CHKnabenschiessen. 
    #   GBLondon - Public Holidays:
    #       GBMayDay, GBBankHoliday, GBSummerBankHoliday, 
    #       GBNewYearsEve.
    #   DEFrankfurt - Public Holidays:
    #       DEAscension, DECorpusChristi, DEGermanUnity, DEChristmasEve,
    #       DENewYearsEve. 
    #   FRParis - Public Holidays:
    #       FRFetDeLaVictoire1945, FRAscension, FRBastilleDay, 
    #       FRAssumptionVirginMary, FRAllSaints, FRArmisticeDay. 
    #   ITMilano - Public Holidays:
    #       ITEpiphany, ITLiberationDay, ITRepublicAnniversary, 
    #       ITAssumptionOfVirginMary, ITAllSaints, ITWWIVictoryAnniversary, 
    #       ITStAmrose, ITImmaculateConception. 
    #   USNewYork/USChicago - Public Holidays:
    #       USNewYearsDay, USInaugurationDay, USMLKingsBirthday, 
    #       USLincolnsBirthday, USWashingtonsBirthday, USMemorialDay, 
    #       USIndependenceDay, USLaborDay,  USColumbusDay, USElectionDay, 
    #       USVeteransDay, USThanksgivingDay, USChristmasDay, 
    #       USCPulaskisBirthday, USGoodFriday. 
    #   CAToronto/CAMontreal - Public Holidays:
    #       CAVictoriaDay, CACanadaDay, CACivicProvincialHoliday, 
    #       CALabourDay, CAThanksgivingDay, CaRemembranceDay. 
    #   JPTokyo/JPOsaka - Public Holidays:
    #       JPNewYearsDay, JPGantan, JPBankHolidayJan2, JPBankHolidayJan3,
    #       JPComingOfAgeDay, JPSeijinNoHi, JPNatFoundationDay,
    #       JPKenkokuKinenNoHi, JPGreeneryDay, JPMidoriNoHi, 
    #       JPConstitutionDay, JPKenpouKinenBi, JPNationHoliday, 
    #       JPKokuminNoKyujitu, JPChildrensDay, JPKodomoNoHi, 
    #       JPMarineDay, JPUmiNoHi, JPRespectForTheAgedDay,
    #       JPKeirouNoHi, JPAutumnalEquinox, JPShuubun-no-hi, 
    #       JPHealthandSportsDay, JPTaiikuNoHi, JPNationalCultureDay, 
    #       JPBunkaNoHi, JPThanksgivingDay, JPKinrouKanshaNohi, 
    #       JPKinrou-kansha-no-hi, JPEmperorsBirthday,
    #       JPTennou-tanjyou-bi, JPTennou-tanjyou-bi. 
    #   All the holiday functions are listed in the data file "holidays.R"
    #   Additional holidays, which are not yet available there, can be added
    #   to this data base file.
    
    # FUNCTION:
        
    # Determine Function:
    holiday = match.fun(holiday)
    ans = holiday(year)
    
    # Classify as simple integer ISO date format CCYYMMDD
    class(ans) = "sdate" 
    
    # Return Value:
    ans
}


################################################################################
# HOLIDAY CALENDAR


holiday.NYSE = 
function(y = currentYear)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Returns 'timeDate' object for full-day NYSE holidays 
    
    # Arguments:
    #   year - an integer variable or vector for the year(s)
    #       ISO-8601 formatted as "CCYY" where easter or
    #       easter related feasts should be computed.
    
    # Value:
    #   Returns the holiday calendar for the NYSE formatted as 
    #   'timeDate' object.
    
    # Details:
    #   The "New York Stock Exchange" calendar starts from year 1885.
    #   The rules are listed at the web site http://www.nyse.com.
    
    # Example:
    #   > holiday.NYSE(2004)
    #   [1] "America/New_York"
    #   [1] [2004-01-01] [2004-01-19] [2004-02-16] [2004-04-09]
    #   [5] [2004-05-31] [2004-07-05] [2004-09-06] [2004-11-25]
    
    # FORMULA:
    
    #  Settings:
    years = y
    holidays = NULL
    
    # Iterate years:
    for (y in years ) { 
        if (y >= 1885) 
            holidays = c(holidays, USNewYearsDay(y))
        if (y >= 1885) 
            holidays = c(holidays, USIndependenceDay(y))    
        if (y >= 1885) 
            holidays = c(holidays, USThanksgivingDay(y))    
        if (y >= 1885)
            holidays = c(holidays, USChristmasDay(y))
        if (y >= 1887)
            holidays = c(holidays, USLaborDay(y))   
        if (y != 1898 & y != 1906 & y != 1907)
            holidays = c(holidays, USGoodFriday(y)) 
        if (y >= 1909 & y <= 1953) 
            holidays = c(holidays, USColumbusDay(y))        
        if (y >= 1998)
            holidays = c(holidays, USMLKingsBirthday(y))        
        if (y >= 1896 & y <= 1953) 
            holidays = c(holidays, USLincolnsBirthday(y))
        if (y <= 1970) 
            holidays = c(holidays, USWashingtonsBirthday(y))
        if (y >= 1970) 
            holidays = c(holidays, USPresidentsDay(y))  
        if (y == 1918 | y == 1921 | (y >= 1934 & y <= 1953)) 
            holidays = c(holidays, USVeteransDay(y))            
        if (y <= 1968 | y == 1972 | y == 1976 | y == 1980) 
            holidays = c(holidays, USElectionDay(y))        
        if (y <= 1970) 
            holidays = c(holidays, USDecorationMemorialDay(y))      
        if (y >= 1971) 
            holidays = c(holidays, USMemorialDay(y)) }  

    # Sort and Convert to 'timeDate':
    holidays = as.character(sort(holidays))
    ans = timeDate(holidays, format = "%Y%m%d", FinCenter = "GMT")
    
    # Move Sunday Holidays to Monday:
    ans = ans + as.integer(as.POSIXlt(as.POSIXct(ans))$wday==0) * 24 * 3600
   
    # After July 3, 1959, move Saturday holidays to Friday
    # ... except if at the end of monthly/yearly accounting period 
    # this is the last business day of a month.
    posix = as.POSIXlt(as.POSIXct(ans))
    y = posix$year + 1900
    m = posix$mon + 1
    lastday = as.POSIXlt(as.POSIXct(timeCalendar(y = y+(m+1)%/%13, 
        m = m+1-(m+1)%/%13*12, d = 1, FinCenter = "GMT")-24*3600))$mday
    ExceptOnLastFriday = timeDate(as.character(
        last.of.nday(year = y, month = m, lastday = lastday, nday = 5)),
        format = "%Y%m%d", FinCenter = "GMT")
    ans = ans - as.integer (
        ans >= timeDate("1959-07-03", format = "%Y-%m-%d", FinCenter = "GMT") &
        as.POSIXlt(as.POSIXct(ans))$wday == 0  &
        ans != ExceptOnLastFriday ) * 24 * 3600 
    
    # Remove Remaining Weekend Dates:
    ans = ans[!(as.POSIXlt(as.POSIXct(ans))$wday == 0 | 
        as.POSIXlt(as.POSIXct(ans))$wday == 6)]
    ans@FinCenter = "America/New_York"
    
    # Return Value:
    ans
}


################################################################################
# N-DAY FAMILY
#   This is a family of four functions for calculating the n-th occurence
#   of n-Days for given months and years. The value returned by these 
#   functions is an ISO-8601 formatted date, written as integer in the 
#   form CCYYMMDD.


on.or.after = 
function(year, month, day, nday)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Calculates date in month that is a nday ON OR AFTER 
    #   date(month,day,year)
    
    # Arguments:
    #   year, month, day - calendar atoms given as integers
    #       in the form CCYY, MM, DD.
    #   nday - an integer vector with entries ranging from 
    #       0 (Sunday) to 6 (Saturday).
    
    # Value:
    #   The date, an object of class 'sdate' formatted as integer.
    
    # Example: 
    #   What date has the first Monday on or after March 15, 1986?
    #   on.or.after(1986, 3, 15, 1)
    
    # FUNCTION:
    
    # sdate:
    ## "year*10000 + month*100 + day" +
    ##  (nday-day.of.week(month, day, year))%%7
    sdate = year*10000+month*100+day
    ans = sdate(sjulian(sdate)+(nday-day.of.week(month, day, year))%%7)
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


on.or.before = 
function(year, month, day, nday)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Calculates date in month that is a nday ON OR BEFORE 
    #   date(month,day,year)
    
    # Arguments:
    #   year, month, day - calendar atoms given as integers
    #       in the form CCYY, MM, DD.
    #   nday - an integer vector with entries ranging from 
    #       0 (Sunday) to 6 (Saturday).
    
    # Value:
    #   The date, an object of class 'sdate' formatted as integer.

    # Example: 
    #   What date has Friday on or before April 22, 1977?
    #   on.or.before(1977, 4, 22, 5) 
    
    # FUNCTION: 
    
    # sdate:
    ## "year*10000 + month*100 + day" -
    ##  (-(nday-day.of.week(month,day,year)))%%7
    sdate = year*10000+month*100+day
    ans = sdate(sjulian(sdate)-(-(nday-day.of.week(month,day,year)))%%7)
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


nth.of.nday = 
function(year, month, nday, nth)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Calculates the "nth" ocurrance of a "nday" (nth = 1, ..., 5) 
    #   in "year,month"
    
    # Arguments:
    #   year, month - calendar atoms given as integers
    #       in the form CCYY, MM.
    #   nday - an integer vector with entries ranging from 
    #       0 (Sunday) to 6 (Saturday).
    #   nth - an inter numbering the "n-th" ocurrance of a "nday"
    
    # Value:
    #   The date, an object of class 'sdate' formatted as integer.
 
    # Example: 
    #   What date is the second Sunday in October 1980?
    #   nth.of.nday(1980, 10, 0, 2)
    
    # FUNCTION: 
    
    # sdate:
    ## "year*10000 + month*100" + 7*nth - 6 +
    ##  (nday-day.of.week(year,month,7*nth-6))%%7
    sdate = year*10000+month*100+1
    ans = sdate(sjulian(sdate)+(nth-1)*7+(nday-day.of.week(month,1,year))%%7) 
    
    # Return Value:
    ans  
}


# ------------------------------------------------------------------------------


last.of.nday = 
function(year, month, lastday, nday)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Calculates the last "nday" in "year/month"
    
    # Arguments:
    #   year, month - calendar atoms given as integers
    #       in the form CCYY, MM.
    #   lastday - an integer which is the last calendar day for
    #       a given "month" and "year".
    #   nday - an integer vector with entries ranging from 
    #       0 (Sunday) to 6 (Saturday).
    
    # Value:
    #   The date, an object of class 'sdate' formatted as integer.
    
    # Example: 
    #   What date has the last Monday in May, 1996?
    #   last.of.nday(1996, 5, 31, 1)
    
    # FUNCTION:
    
    # sdate:
    ## "year*10000 + month*100 + lastday" -
    ##  (day.of.week(year,month,lastday)-nday)%%7
    sdate = year*10000 + month*100 + lastday
    ans = sdate(sjulian(sdate)-(-(nday-day.of.week(month,lastday,year)))%%7)
    
    # Return Value:
    ans
}


################################################################################
# SDATE - FAMILY:
#   What is the  'sdate' format? 
#   'sdate' is a very simple class of objects of integer formatted ISO  
#   dates CCYYMMDD, e.g. 20040101. I introduced this class long ago 
#   before R had POSIX date/time objects. Now I use this simple date
#   format for managing holiday calendars.
#   The following functions return objects of class 'sdate':
#   easter(), holiday()
#   sdate(), sday.of.week(), sleap.year()
#   on.or.after(), on.or.before(), nth.of.nday(), last.of.nday()



sdate = 
function (julians, origin = 19600101)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Calculates Gregorian dates from Julian day numbers
    
    # Arguments:
    #   julians - an integer variable or vector of Julian day 
    #       counts.
    #   origin - the origin of the Julian day counter, formatted
    #       in ISO-8601 date format CCYYMMDD.
    
    # Value:
    #   Returns a vector of dates formatted as "sdates", i.e.
    #   CCYYMMDD integer values.
    
    # FUNCTION:
    
    # Internal Function:
    month.day.year = function(jul, origin = c(1, 1, 1960)) {
        # shift = .julian(1, 1, 1960, 0)    
        shift = 2436935
        j = jul + shift
        j = j - 1721119
        y = (4 * j - 1) %/% 146097
        j = 4 * j - 1 - 146097 * y
        d = j %/% 4
        j = (4 * d + 3) %/% 1461
        d = 4 * d + 3 - 1461 * j
        d = (d + 4) %/% 4
        m = (5 * d - 3) %/% 153
        d = 5 * d - 3 - 153 * m
        d = (d + 5) %/% 5
        y = 100 * y + j
        y = y + ifelse(m < 10, 0, 1)
        m = m + ifelse(m < 10, 3, -9)
        return(list(month = m, day = d, year = y)) }
    
    # Julian Day Numbers to ISO-8601 Gregorian Dates:
    year0 = origin%/%10000
    month0 = (origin-10000*year0)%/%100
    day0 = origin-10000*year0-100*month0
    
    # Month - Day - Year Function:
    mdylist = month.day.year(julians, origin = c(month0, day0, year0))
 
    # In 'sdate' Format:
    ans = mdylist$year*10000 + mdylist$month*100 + mdylist$day
    
    # Return Value:
    class(ans) = "sdate"
    ans
} 


# ------------------------------------------------------------------------------


sjulian = 
function (sdates, origin = 19600101)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Calculates Julian day numbers from Gregorian ISO-8601
    #   formatted dates, CCYYMMDD
    
    # Arguments:
    #   sdates - an integer variable or vector of dates, formatted
    #       in ISO-8601 date format CCYYMMDD.
    #   origin - the origin of the Julian day counter, formatted
    #       in ISO-8601 date format CCYYMMDD.
    
    # Value:
    #   Returns Julian time as days since some origin.  
        
    # FUNCTION:
    
    # Internal Function:
    .julian = function(m, d, y, origin = c(month = 1, day = 1, year = 1960)) {  
        only.origin = all(missing(m), missing(d), missing(y))
        if (only.origin) m = d = y = NULL   
        nms = names(d)
        max.len = max(length(m), length(d), length(y))  
        m = c(origin[1], rep(m, length = max.len))
        d = c(origin[2], rep(d, length = max.len))
        y = c(origin[3], rep(y, length = max.len))  
        y = y + ifelse(m > 2, 0, -1)
        m = m + ifelse(m > 2, -3, 9)
        c = y %/% 100
        ya = y - 100 * c
        out = (146097 * c) %/% 4 + (1461 * ya) %/% 4 + 
            (153 * m + 2) %/% 5 + d + 1721119   
        if (!only.origin) {
            if(all(origin == 0)) out = out[-1] else out = out[-1] - out[1] }    
        names(out) = nms
        out }

    # ISO-8601 GREGORIAN DATES TO JULIAN DAY NUMBERS:
    year = sdates%/%10000
    month = (sdates-10000*year)%/%100
    day = sdates-10000*year-100*month
    
    # ISO-8601 ORIGIN:
    year0 = origin%/%10000
    month0 = (origin-10000*year0)%/%100
    day0 = origin-10000*year0-100*month0
    
    # Julian:
    ans = .julian(month, day, year, origin = c(month0, day0, year0))
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


sday.of.week = 
function(sdates)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Calculates the day of week from an ISO-8601 formatted date
    
    # Arguments:
    #   sdates - an integer variable or vector of dates, formatted
    #       in ISO-8601 date format CCYYMMDD.
    
    # Value:
    #   Returns a number between 0 and 6 to specify the day of
    #   the week-0 refers to Sunday.
    
    # FUNCTION::fBasic  
    
    # Year - Month - Day:
    # Sunday 0, Monday 1, ..., Saturday 6
    year = sdates%/%10000
    month = sdates%/%100 - year*100
    day = sdates - year*10000 - month*100
    a = (14-month)%/%12
    y = year - a
    m = month + 12*a - 2
    
    # Day of Week:
    ans = (day + y + y%/%4 - y%/%100 + y%/%400 + (31*m)%/%12)%%7
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


sleap.year = 
function(sdates)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Calculates if a year is a leap year or not
    #   takes the value T(rue) for leap year, otherwise F(alse)
    
    # Arguments:
    #   sdates - an integer variable or vector of dates, formatted
    #       in ISO-8601 date format CCYYMMDD.
    
    # Value:
    #   Returns a logical vector indicating whether the corresponding 
    #   year is a leap year or not.
    
    # FUNCTION:
        
    # Year:
    year = sdates%/%10000
    
    # Leap Years
    ans = year %% 4 == 0 & (year %% 100 != 0 | year %% 400 == 0)
    
    # Return Value:
    ans
}


# ------------------------------------------------------------------------------


print.sdate =
function(x, ...)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Print method for objects of class "sdate".
    
    # Arguments:
    #   x - anobject of class "sdate"
    
    # FUNCTION:
    
    # Print in the same format as 'timeDate' objects:
    print(timeDate(x, ...))
    
    # Return Value:
    invisible()
}


# ******************************************************************************


fjulian = 
function(fdates, origin = 19600101, order = 'mdy', cc = 20)
{	# # A function implemented by Diethelm Wuertz

	# Description:
 	#	Transforms formatted dates (fdates) from several formats 
 	#	as 8/11/73 11Aug1973, ... into ISO-8601 Gregorian dates
 	#	... makes use of C-Program char_date.c implemented by 
	#	Terry Therneau
 
	# Requirements:
	#	R-package "date"
	#	Splus Like Function .julian
	
	# Function Calls:
	#	C: char_date()
 	
	# FUNCTION:
	
	# Formats:
	order.vec = switch(order,
 		'ymd'= c(1,2,3),
 		'ydm'= c(1,3,2),
 		'mdy'= c(2,3,1),
 		'myd'= c(2,1,3),
 		'dym'= c(3,1,2),
 		'dmy'= c(3,2,1),
 		stop("Invalid value for 'order' option"), 
 		PACKAGE = "fBasics")
 		nn = length(fdates)
 		temp = .C("char_date", 
 			as.integer(nn),
 			as.integer(order.vec),
 			as.character(fdates),
 			month = integer(nn),
 			day = integer(nn),
 			year = integer(nn),
 			PACKAGE = "fBasics")
 		month = temp[[4]]
 		day = temp[[5]]
 		year = temp[[6]]
 		yy = year - 100 * floor (year/100)
 		year = cc*100 + yy
 	
	# Origin:
 		cc0 = origin%/%1000000
 		yymmdd0 = origin-cc0*1000000
 		yy0 = yymmdd0%/%10000
 		mm0 = yymmdd0%/%100-yy0*100
 		dd0 = yymmdd0-yy0*10000-mm0*100

	# Return Value:
 	.julian(month, day, year, origin = c(mm0, dd0, cc0*100+yy0))
}


# ******************************************************************************


.julian =
function(m, d, y, origin = c(month = 1, day = 1, year = 1960))
{	# A function implemented by Diethelm Wuertz
	
	# Description:
	#	This function is a synonyme for Splus' "julian()" with the
	#	same list of arguments.
	
	# Note:
	#	SPlus like.

	# FUNCTION:
	
	# Selection:
	.R = TRUE
	.S = FALSE
	
	# Implementation under R:
	if(.R) {	
		only.origin = all(missing(m), missing(d), missing(y))
		if(only.origin) m = d = y = NULL	# return days since origin
		nms = names(d)
		max.len = max(length(m), length(d), length(y))	
		# prepend new origin value and rep out to common max. length:
		m = c(origin[1], rep(m, length = max.len))
		d = c(origin[2], rep(d, length = max.len))
		y = c(origin[3], rep(y, length = max.len))	
		# code from julian date in the S book (p.269)
		y = y + ifelse(m > 2, 0, -1)
		m = m + ifelse(m > 2, -3, 9)
		c = y %/% 100
		ya = y - 100 * c
		out = (146097 * c) %/% 4 + (1461 * ya) %/% 4 + 
			(153 * m + 2) %/% 5 + d + 1721119	
		# now subtract the new origin from all dates
		if(!only.origin) {
			if(all(origin == 0)) out = out[-1] else out = out[-1] - out[1] }	
		names(out) = nms
		result = out }
	
	# Synonyme for S:
	if(.S) {
		result = julian(m = m, d = d, y = y, origin. = origin)}

	# Return Value:
	result
}


# ------------------------------------------------------------------------------


month.day.year = 
function(jul, origin = c(month = 1, day = 1, year = 1960))
{	# # A function implemented by Diethelm Wuertz

	# Description:
	#	This function is a synonyme for Splus' "month.day.year()" with
	#	the same list of arguments.
	
	# Note:
	#	Splus like.
	
	# FUNCTION:	
	
	# Selection:
	.R = TRUE
	.S = FALSE
	
	# Implementation under R:
	if (.R) {
		shift = .julian(1, 1, 1960, 0)	
		j = jul + shift
		j = j - 1721119
		y = (4 * j - 1) %/% 146097
		j = 4 * j - 1 - 146097 * y
		d = j %/% 4
		j = (4 * d + 3) %/% 1461
		d = 4 * d + 3 - 1461 * j
		d = (d + 4) %/% 4
		m = (5 * d - 3) %/% 153
		d = 5 * d - 3 - 153 * m
		d = (d + 5) %/% 5
		y = 100 * y + j
		y = y + ifelse(m < 10, 0, 1)
		m = m + ifelse(m < 10, 3, -9)
		result = list(month = m, day = d, year = y)}	
	# Synonyme for S:
	if (.S) { 
		result = month.day.year(jul = jul, origin. = origin)}	
			
	# Return Value:
	result
}


# ------------------------------------------------------------------------------


leap.year = 
function(y)
{	# A function implemented by Diethelm Wuertz

	# Description:
	#	Decides if a year is a leap year or not
	
	# FUNCTION:
	
	# Return Value:
	y = month.day.year(as.numeric(y), origin = origin(y))$year
	y %% 4 == 0 & (y %% 100 != 0 | y %% 400 == 0)
}


# ------------------------------------------------------------------------------


day.of.week = 
function(month, day, year) 
{	# A function implemented by Diethelm Wuertz

	# Description:
	#	A Synonyme for sday.of.week() function
	
	# Note:
	#	SPlus like.

	# FUNCTION:
	
	# ReturnValue:
	sday.of.week(year*10000+month*100+day)
}


# ------------------------------------------------------------------------------


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#	  iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#	  General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#	sources obtained from a few dozens of websites


################################################################################
# Holiday Database:
# Copyright 1997, Diethelm Wuertz
# 	www.rmetrics.org
# Required "Holiday" Functions:
#	"easter", "on.or.after", "nth.of.nday", "last.of.nday", 
# The functions return an object of class "sdate"
#	ISO-8601 formatted integers, i.e. CCYYMMDD
################################################################################


Septuagesima = function(year) {
	ans = easter(year, -63)}
Quinquagesima = function(year) {
	ans = easter(year, -49)}
AshWednesday = function(year) {
	ans = easter(year, -46)}
PalmSunday = function(year) {
	ans = easter(year, -7)}
GoodFriday = function(year) {
	ans = easter(year, -2)
	class(ans) = "sdate" 
	ans}
Easter = function(year) {
	ans = easter(year)
	class(ans) = "sdate" 
	ans}
EasterSunday = function(year) {
	ans = easter(year)
	class(ans) = "sdate" 
	ans}
EasterMonday = function(year) {
	ans = easter(year, 1)
	class(ans) = "sdate" 
	ans}
RogationSunday = function(year) {
	ans = easter(year, 35)
	class(ans) = "sdate" 
	ans}
Ascension = function(year) {
	ans = easter(year, 39)
	class(ans) = "sdate" 
	ans}
Pentecost = function(year) {
	ans = easter(year, 49)
	class(ans) = "sdate" 
	ans}
PentecostMonday	<- function(year) {
	ans = easter(year, 50)
	class(ans) = "sdate" 
	ans}
TrinitySunday = function(year) {
	ans = easter(year, 56)
	class(ans) = "sdate" 
	ans}
CorpusChristi = function(year) {
	ans = easter(year, 60)
	class(ans) = "sdate" 
	ans}

	
# ------------------------------------------------------------------------------


ChristTheKing = function(year) {
	ans = on.or.after(year, 11, 20, 0)
	class(ans) = "sdate" 
	ans}
Advent1st = function(year) {
	ans = on.or.after(year, 11, 27, 0)
	class(ans) = "sdate" 
	ans}
Advent2nd = function(year) {
	ans = on.or.after(year, 12,  4, 0)
	class(ans) = "sdate" 
	ans}
Advent3rd = function(year) {
	ans = on.or.after(year, 12, 11, 0)
	class(ans) = "sdate" 
	ans}
Advent4th = function(year) {
	ans = on.or.after(year, 12, 18, 0)
	class(ans) = "sdate" 
	ans}
ChristmasEve = function(year) {
	ans = year*10000 + 1224
	class(ans) = "sdate" 
	ans}
ChristmasDay = function(year) {
	ans = year*10000 + 1225
	class(ans) = "sdate"
	ans }
BoxingDay = function(year) {
	ans = year*10000 + 1226
	class(ans) = "sdate"
	ans }

	
# ------------------------------------------------------------------------------

	
SolemnityOfMary	<- function(year) {
	ans = year*10000 + 0101
	class(ans) = "sdate"
	ans }
Epiphany = function(year) {
	ans = year*10000 + 0106
	class(ans) = "sdate"
	ans }
PresentationOfLord = function(year) {
	ans = year*10000 + 0202
	class(ans) = "sdate"
	ans }
Annunciation = function(year) {
	ans = year*10000 + 0325
	class(ans) = "sdate"
	ans }
TransfigurationOfLord = function(year) {
	ans = year*10000 + 0806
	class(ans) = "sdate"
	ans }
AssumptionOfMary = function(year) {
	ans = year*10000 + 0815
	class(ans) = "sdate"
	ans }
BirthOfVirginMary = function(year) {
	ans = year*10000 + 0908
	class(ans) = "sdate"
	ans }
CelebrationOfHolyCross	<- function(year) {
	ans = year*10000 + 0914
	class(ans) = "sdate"
	ans }
MassOfArchangels = function(year) {
	ans = year*10000 + 0929
	class(ans) = "sdate"
	ans }
AllSaints = function(year) {
	ans = year*10000 + 1101
	class(ans) = "sdate"
	ans }
AllSouls = function(year) {
	ans = year*10000 + 1102
	class(ans) = "sdate"
	ans }

	
# ------------------------------------------------------------------------------


NewYearsDay = function(year) {
	ans = year*10000 + 0101
	class(ans) = "sdate"
	ans }
LaborDay = function(year) {
	ans = year*10000 + 0501
	class(ans) = "sdate"
	ans }
	
	
# ------------------------------------------------------------------------------
	

CHBerchtoldsDay	= function(year) {
	ans = year*10000 + 0102
	class(ans) = "sdate"
	ans }
CHSechselaeuten	= function(year) {
	ans = NULL
	for (y in year) {
		theDate = nth.of.nday(y, 4, 1, 3)
		if (theDate == easter(y, +1)) {
			theDate = nth.of.nday(y, 4, 1, 4) }
		ans = c(ans, theDate) }
	class(ans) = "sdate"
	ans
	}
CHAscension = function(year) {
	ans = easter(year, 39)
	class(ans) = "sdate" 
	ans}
CHConfederationDay = function(year) {
	ans = year*10000 + 0801
	class(ans) = "sdate"
	ans }
CHKnabenschiessen = function(year) {
	ans = nth.of.nday(year, 9, 1, 2)
	class(ans) = "sdate" 
	ans}

		
# ------------------------------------------------------------------------------


GBMayDay = function(year) {
	ans = nth.of.nday(year, 5, 1, 1)
	class(ans) = "sdate" 
	ans}
GBBankHoliday = function(year) {
	ans = last.of.nday(year, 5, 31, 1)
	class(ans) = "sdate" 
	ans}
GBSummerBankHoliday = function(year) {
	ans = last.of.nday(year, 8, 31, 1)
	class(ans) = "sdate" 
	ans}
GBMilleniumDay = function(year) {
	ans = 19991231
	class(ans) = "sdate"
	ans }

		
# ------------------------------------------------------------------------------


DEAscension = function(year) {
	ans = easter(year, 39)
	class(ans) = "sdate" 
	ans}
DECorpusChristi	<- function(year) {
	ans = easter(year, 60)
	class(ans) = "sdate" 
	ans}
DEGermanUnity = function(year) {
	ans = year*10000 + 1003
	class(ans) = "sdate"
	ans }
DEChristmasEve = function(year) {
	ans = year*10000 + 1224
	class(ans) = "sdate"
	ans }
DENewYearsEve = function(year) {
	ans = year*10000 + 1231
	class(ans) = "sdate"
	ans }

		
# ------------------------------------------------------------------------------


FRFetDeLaVictoire1945 = function(year) {
	ans = year*10000 + 0508
	class(ans) = "sdate"
	ans }
FRAscension = function(year) {
	easter(year, 39)}
FRBastilleDay = function(year) {
	ans = year*10000 + 0714
	class(ans) = "sdate"
	ans }
FRAssumptionVirginMary = function(year) {
	ans = year*10000 + 0815
	class(ans) = "sdate"
	ans }
FRAllSaints = function(year) {
	ans = year*10000 + 1101
	class(ans) = "sdate"
	ans }
FRArmisticeDay = function(year) {
	ans = year*10000 + 1111
	class(ans) = "sdate"
	ans }

	
# ------------------------------------------------------------------------------


ITEpiphany = function(year) {
	ans = year*10000 + 0106
	class(ans) = "sdate"
	ans }
ITLiberationDay	<- function(year) {
	ans = year*10000 + 0425
	class(ans) = "sdate"
	ans }
ITAssumptionOfVirginMary = function(year) {
	ans = year*10000 + 0815
	class(ans) = "sdate"
	ans }
ITAllSaints = function(year) {
	ans = year*10000 + 1101
	class(ans) = "sdate"
	ans }
ITStAmrose = function(year) {
	ans = year*10000 + 1207
	class(ans) = "sdate"
	ans }
ITImmaculateConception = function(year) {
	ans = year*10000 + 1208
	class(ans) = "sdate"
	ans }

	
# ------------------------------------------------------------------------------


USNewYearsDay = function(year) {
	ans = year*10000 + 0101
	class(ans) = "sdate"
	ans }
USInaugurationDay = function(year) {
	ans = year*10000 + 0120
	class(ans) = "sdate"
	ans }
USMLKingsBirthday = function(year) {
	ans = nth.of.nday(year, 1, 1, 3)
	class(ans) = "sdate" 
	ans}
USLincolnsBirthday = function(year) {
	ans = year*10000 + 0212
	class(ans) = "sdate"
	ans }
USWashingtonsBirthday = function(year) {
	ans = nth.of.nday(year, 2, 1, 3)
	class(ans) = "sdate" 
	ans}
USMemorialDay = function(year) {
	ans = last.of.nday(year, 5, 31, 1)
	class(ans) = "sdate" 
	ans}
USIndependenceDay = function(year) {
	ans = year*10000 + 0704
	class(ans) = "sdate"
	ans }
USLaborDay = function(year) {
	ans = nth.of.nday(year, 9, 1, 1)
	class(ans) = "sdate" 
	ans}
USColumbusDay = function(year) {
	ans = nth.of.nday(year, 10, 1, 2)
	class(ans) = "sdate" 
	ans}
USElectionDay = function(year) {
	ans = on.or.after(year, 11, 2, 2)
	class(ans) = "sdate" 
	ans}
USVeteransDay = function(year) {
	ans = year*10000 + 1111
	class(ans) = "sdate"
	ans }
USThanksgivingDay  = function(year) {
	ans = nth.of.nday(year, 11, 4, 4)}
USChristmasDay = function(year) {
	ans = year*10000 + 1225
	class(ans) = "sdate"
	ans }
USCPulaskisBirthday = function(year) {
	ans = nth.of.nday(year, 3, 1, 1)
	class(ans) = "sdate" 
	ans }
USGoodFriday = function(year) {
	ans = easter(year, -2)
	class(ans) = "sdate" 
	ans}
USPresidentsDay = function(year) {
	ans = nth.of.nday(year, 2, 1, 3) 
	class(ans) = "sdate" 
	ans }
USDecorationMemorialDay = function(year) {
	ans = year*10000 + 0530
	class(ans) = "sdate"
	ans }

	
# ------------------------------------------------------------------------------


CAVictoriaDay = function(year) {
	ans = on.or.before(year, 5, 24, 1)
	class(ans) = "sdate" 
	ans}
CACanadaDay = function(year) {
	ans = year*10000 + 0701
	class(ans) = "sdate"
	ans }
CACivicProvincialHoliday = function(year) {
	ans = nth.of.nday(year, 8, 1, 1)
	class(ans) = "sdate" 
	ans }
CALabourDay = function(year) {
	nth.of.nday(year, 9, 1, 1)}
CAThanksgivingDay = function(year) {
	ans = nth.of.nday(year, 10, 1, 2)
	class(ans) = "sdate" 
	ans }
CaRemembranceDay = function(year) {
	ans = year*10000 + 1111
	class(ans) = "sdate"
	ans }

	
# ------------------------------------------------------------------------------


JPNewYearsDay = function(year) {
	ans = year*10000 + 0101
	class(ans) = "sdate"
	ans }
JPGantan = function(year) {
	ans = year*10000 + 0101
	class(ans) = "sdate"
	ans }
JPBankHolidayJan2 = function(year) {
	ans = year*10000 + 0102
	class(ans) = "sdate"
	ans }
JPBankHolidayJan3 = function(year) {
	ans = year*10000 + 0103
	class(ans) = "sdate"
	ans }
JPComingOfAgeDay = function(year) {
	ans = year*10000 + 0115
	class(ans) = "sdate"
	ans }
JPSeijinNoHi = function(year) {
	ans = year*10000 + 0115
	class(ans) = "sdate"
	ans }
JPNatFoundationDay = function(year) {
	ans =year*10000 + 0211
	class(ans) = "sdate"
	ans }
JPKenkokuKinenNoHi = function(year) {
	ans = year*10000 + 0211
	class(ans) = "sdate"
	ans }
JPGreeneryDay = function(year) {
	ans = year*10000 + 0429
	class(ans) = "sdate"
	ans }
JPMidoriNoHi = function(year) {
	ans = year*10000 + 0429
	class(ans) = "sdate"
	ans }
JPConstitutionDay = function(year) {
	ans = year*10000 + 0503
	class(ans) = "sdate"
	ans }
JPKenpouKinenBi = function(year) {
	ans = year*10000 + 0503
	class(ans) = "sdate"
	ans }
JPNationHoliday = function(year) {
	ans = year*10000 + 0504
	class(ans) = "sdate"
	ans }
JPKokuminNoKyujitu = function(year) {
	ans = year*10000 + 0504
	class(ans) = "sdate"
	ans }
JPChildrensDay = function(year) {
	ans = year*10000 + 0505
	class(ans) = "sdate"
	ans }
JPKodomoNoHi = function(year) {
	ans = year*10000 + 0505
	class(ans) = "sdate"
	ans }
JPMarineDay = function(year) {
	ans = year*10000 + 0720
	class(ans) = "sdate"
	ans }
JPUmiNoHi = function(year) {
	ans = year*10000 + 0720
	class(ans) = "sdate"
	ans }
JPRespectForTheAgedDay = function(year) {
	ans = year*10000 + 0915
	class(ans) = "sdate"
	ans }
JPKeirouNOhi = function(year) {
	ans = year*10000 + 0915
	class(ans) = "sdate"
	ans }
JPAutumnalEquinox = function(year) {
	ans = year*10000 + 0924
	class(ans) = "sdate"
	ans }
JPShuubunNoHi = function(year) {
	ans =year*10000 + 0924
	class(ans) = "sdate"
	ans }
JPHealthandSportsDay = function(year) {
	ans = year*10000 + 1010
	class(ans) = "sdate"
	ans }
JPTaiikuNoHi = function(year) {
	ans = year*10000 + 1010
	class(ans) = "sdate"
	ans }
JPNationalCultureDay = function(year) {
	ans = year*10000 + 1103
	class(ans) = "sdate"
	ans }
JPBunkaNoHi = function(year) {
	ans = year*10000 + 1103
	class(ans) = "sdate"
	ans }
JPThanksgivingDay = function(year) {
	ans = year*10000 + 1123
	class(ans) = "sdate"
	ans }
JPKinrouKanshaNoHi = function(year) {
	ans = year*10000 + 1123
	class(ans) = "sdate"
	ans }
JPEmperorsBirthday = function(year) {
	ans = year*10000 + 1123
	class(ans) = "sdate"
	ans }
JPTennouTanjyouBi = function(year) {
	year*10000 + 1123
	class(ans) = "sdate"
	ans }
JPBankHolidayDec31 = function(year) {
	ans =year*10000 + 1231
	class(ans) = "sdate"
	ans }

	
# ------------------------------------------------------------------------------


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA 02111-1307 USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#     iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#     General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#   sources obtained from a few dozens of websites


################################################################################
# FUNCTION:             DESCRIPTION:
#  xjulian               Compute Julian minute numbers from ISO-8601 dates
#  xdate                 Compute ISO-8601 date/times from Julian minute numbers
#  xday.of.week          Compute day of the week for ISO-8601 dates
#  xleap.year            Return T/F if date/times belong to leap years or not
# FUNCTION:             DESCRIPTION:
#  fxdata.contributors   Creates a table with contributor names    
#  fxdata.parser         Parses FX contributors and delay times
#  fxdata.filter         Filters price and spread values from FX data records
#  fxdata.varmin         Aggregates data records to variable minutes data format
# FUNCTION:		   		DESCRIPTION:
#  xts.log				 Calculates logarithms for xts time series values
#  xts.diff				 Differentiates xts time series values with lag=1
#  xts.cut				 Cuts a piece out of a xts time series
#  xts.interp			 Interpolates for equidistant time steps
#  xts.map				 Creates a volatility adjusted time-mapping 
#  xts.upsilon			 Interpolates a time series in upsilon time
#  xts.dvs				 Creates a de-volatilizised time series
#  xts.dwh				 Plots intra-daily/weekly histograms 
################################################################################


xjulian = 
function (xdates, origin = 19600101)
{   # A function implemented by Diethelm Wuertz
    
    # Description:
    #   Calculates Julian minute counts from ISO-8601 Gregorian
    #   dates/times.
    
    # Arguments: 
    #   XDATES: CCYYMMDDhhmm format expected
    
    # FUNCTION:
    
    # Date/Time:
    cc = xdates %/% 10000000000 
    yymmdd = xdates %/% 10000 - cc * 1000000
    yy = yymmdd %/% 10000
    mm = yymmdd %/% 100 - yy * 100
    dd = yymmdd - yy * 10000 - mm * 100
    hhmm = xdates - 10000000000 * cc - 10000 * yymmdd
    hh = hhmm %/% 100
    ms = hhmm-100 * hh
    
    # Origin: 
    cc0 = origin %/% 1000000
    yymmdd0 = origin-cc0*1000000
    yy0 = yymmdd0 %/% 10000
    mm0 = yymmdd0 %/% 100 - yy0 * 100
    dd0 = yymmdd0 - yy0 * 10000 - mm0 * 100
    
    # Return Value:
    1440 * .julian(mm, dd,100*cc + yy, 
        origin=c(mm0, dd0, 100*cc0+yy0)) + 60*hh + ms
}


# ------------------------------------------------------------------------------


xdate =  
function (xjulians, origin = 19600101)
{   # A function implemented by Diethelm Wuertz

    # Description: 
    #   Calculates ISO-8601 Gregorian dates/times from Julian
    #   minute counts.
    
    # Arguments: 
    #   ORIGIN: CCYYMMDD expected
    
    # FUNCTION:
    
    # Julians:
    cc0 = origin%/%1000000
    yymmdd0 = origin-cc0*1000000
    yy0 = yymmdd0%/%10000
    mm0 = yymmdd0%/%100-yy0*100
    dd0 = yymmdd0-yy0*10000-mm0*100
    
    # EXTENDED JULIAN COUNTING: expected in minutes
    # TO XDATE:
    julians = xjulians%/%1440
    xgreg = month.day.year(julians,origin=c(mm0,dd0,cc0*100+yy0))
    ccyymmdd = xgreg$year*10000+xgreg$month*100+xgreg$day
    minutes = xjulians-1440*julians
    hh = minutes%/%60
    ms = minutes-60*hh
    hhmm = 100*hh+ms
    
    # Return Value:
    ccyymmdd*10000+hhmm
}


# ------------------------------------------------------------------------------


xday.of.week =  
function(xdates)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Calculates the day of the week from ISO-8601 Gregorian
    #   dates/times
    
    # FUNCTION:
    
    # Return Value:
    sday.of.week(xdates %/% 10000)
}


# ------------------------------------------------------------------------------


xleap.year =  
function(xdates)
{   # A function implemented by Diethelm Wuertz

    # Description:
    #   Decides whether ISO 8601 Gregorian dates/times are leap
    #   years or not.
    
    # FUNCTION:
    
    # Return Value:
    sleap.year(xdates %/% 10000)
}


################################################################################



fxdata.contributors = 
function(x, include = 10)
{   # A function implemented by D. Wuertz
    #
    # Description:
    #   Create a table with contributor names 
    #
    # Note:
    #   This function expects an ASCII data file with intradaily records
    #   from the FX market and creates a standardized data.frame. 
    #   The variables "datetime", "timestamp", "contributor", "bid", "ask",
    #   and "tag" describe in which column of the original file the
    #   corresponding information is positioned. Note, "datetime" is
    #   expected to be in ISO-8601 date/time format as "CCYYMMDDhhmm".
    #   If the file has a header its length in number of lines has to 
    #   be specified by the variable "skip".
    #   The data fields are comma separated, otherwise the field separator 
    #   has to be given explixitely through the variable "sep".
    #   File Columns:
    #   The function reads from 5-column input file, with arbitrary
    #   order of the columns. By default in 
    #   column 1 datetime (ISO-8601) "CCYYMMDDhhmm" is expected, in 
    #   column 2 timestamp (record delay in min) "mm" is expected, in
    #   column 3 contributor (4-digit code) "XXXX" is expected, in
    #   column 4 bid price, in
    #   column 5 ask price, and in
    #   column 6 tag are expected.
    
    # Values:
    #   The created output is a data.frame with 5 comma separated fields: 
    #   date/time in ISO-8601 format, an additional timestamp, the 
    #   contributors name, and the bid and ask price. The header is
    #   of the form "CCYYMMDDhhmm,TIMESTAMP,CONTRIBUTOR,BID,ASK".
    
    # Arguments:
    #   x       Standard FX data.frame with columns "datetime, 
    #           timestamp, contributor, bid, ask, tag", in the same 
    #           format as specified in "xts.fxread".
    #   include How many contributors should be included? By default
    #           the first 10 market makers
    
    # FUNCTION:
        
    # Parser Table:
    sorted = sort(x[,3])
    contributor = as.vector(unique(sorted))
    counts = diff(grep("FALSE",
        c(as.character(duplicated(sorted)), "FALSE")))
    percent = round(100*counts/sum(counts), digits=4)
    select = substring(as.character(percent > include), 1, 1)
    contributor.table = data.frame(cbind(contributor, 
        counts, percent, select))
    names(contributor.table) = c("CONTRIBUTOR", "COUNTS",
        "PERCENT", "SELECT")    
    # Return Value:
        contributor.table
}


# ------------------------------------------------------------------------------


fxdata.parser = 
function(x, parser.table)
{   # A function implemented by D. Wuertz
    
    # Description:
    #   Create or read a table with contributor names and parse the
    #   data. Return the data according to this parser table. I.e., 
    #       only those contributors are parsed who are listed in the 
    #   parser table. 
    
    # Arguments:
    #   x   Standard FX data.frame with columns "datetime, 
    #       timestamp, contributor, bid, ask, tag", in the same 
    #       format as specified in "xts.fxread".
    
    # FUNCTIOM:
    
    # Parse Contributor List:   
    index = NA
    contributors <<- levels(parser.table[,1])[parser.table[,4]=="T"]
    for (contributor in contributors)  { 
        new.index = grep(contributor, as.character(x[,3]))
        index = c(index, new.index)
        }
    index = sort(index[2:length(index)])
    
    # Return Values:
    x[index,]   
}


# ------------------------------------------------------------------------------


fxdata.filter = 
function(x, parameter = "strong", doprint = TRUE)
{   # A function implemented by D. Wuertz
    
    # Description:
    #   Filter a FX time series
    
    # Note:
    #   Function Calls:
    #   Fortran: SUBROUTINE FXFILTER()
    
    # FUNCTION:
        
    # Parameter Settings:
    # Select one from the two defaults:
    if(is.character(parameter))  { 
        if(parameter == "strong")  
            fxparam = c(0.5, 2.0, 0.18, 0.25, 1.3, 45.0, 
                4.0, 0.00010,0.025)  
        if(parameter == "weak")
            fxparam = c(0.5, 2.2, 0.27, 0.40, 1.5, 75.0,
                5.5, 0.00008,0.004) }
    # Tailored Parameter Selection:
    else {
        fxparam = parameter }
        
    # Now filter the data.
    # FORTRAN subroutine 
    # fxfilter(xjulian, bid, ask, fparm, index, nd, nacc)
    #   if index is positive, the price is accepted, otherwise
    #   if index is negative, the prise is filtered out
    #   the value itself serves as a counter
    if(doprint) { 
        cat("\nFiltering Data Set ...")
        cat("\n  Filter Parameter:")
        cat("\n    D  = ", fxparam[1])
        cat("\n    S  = ", fxparam[2]) 
        cat("\n    A  = ", fxparam[3])
        cat("\n    Q  = ", fxparam[4]) 
        cat("\n    C  = ", fxparam[5])
        cat("\n    T  = ", fxparam[6]) 
        cat("\n    U  = ", fxparam[7])
        cat("\n    V  = ", fxparam[8]) 
        cat("\n    W  = ", fxparam[9], "\n")}   
    julians = xjulian(as.numeric(x[,1]), 
        origin=floor(as.numeric(x[1,1])/10000))
    nd = length(julians)
    result = .Fortran("fxfilter",
        as.double(julians),
        as.double(as.vector(x[,4])),
        as.double(as.vector(x[,5])),
        as.double(fxparam),
        as.integer(1:nd),
        as.integer(nd),
        PACKAGE = "fBasics")
    index = result[[5]]
    
    # Return Result:
    list(
        accepted = x[ index[index > 0],], 
        rejected = x[-index[index < 0],])
}


# ------------------------------------------------------------------------------


fxdata.varmin = 
function(x, digits = 4)
{   # A function implemented by D. Wuertz
    
    # Description:
    #   Creates from a standardized FX high frequency data file
    #   a variable minutes formatted data file, i.e. all data
    #   records within the same minute are averaged.
    
    # Note:
    #   Function Calls:
    #   Fortran: SUBROUTINE FXVARMIN()
    #   Functions:
    #   xjulian, 
    #   Fortran: fxvarmin

    # FUNCTION:
    
    # Settings:
    julian = xjulian(x[, 1], origin=x[1, 1]%/%10000)    
    index = unique(sort(julian))    
    
    # Subroutine(bid, ask, vbid, vask, julian, icount, nx, nv)
    result = .Fortran("fxvarmin",
        as.double(x[, 4]),
        as.double(x[, 5]),
        as.double(rep(0, times = length(index))),
        as.double(rep(0, times = length(index))),
        as.integer(julian),
        as.integer(rep(0, times = length(index))),
        as.integer(length(julian)),
        as.integer(length(index)),
        PACKAGE = "fBasics")    
    # Bind columns return as data.frame:
    result = data.frame(cbind(
        unique(x[, 1]), 
        rep(0, times=length(index)),
        rep("MEAN",times=length(index)),
        round(result[[3]], digits=digits),
        round(result[[4]], digits=digits),
        result[[6]] 
        ))
    names(result) = c("XDATE", "DELAY", "CONTRIBUTOR", 
        "BID", "ASK", "FLAG")   
    
    # Return Result:
    result
}


################################################################################



xts.log = 
function(xts)
{	# A function implemented by D. Wuertz
		
 	# Description:
 	#	Calculate logarithms for xts time series values;
 	 
	# Details:
	#	This function is mainly used for calculating 
	#	log-prices from prices.
 	
	# FUNCTION:
 	
	# Return Values:
 	list(t = xts$t, x = log(xts$x))
}


# ------------------------------------------------------------------------------


xts.diff = 
function(xts)
{	# A function implemented by D. Wuertz
		
 	# Description:
 	#	Differnetiate xts time series values with lag=1
 	#	and add a zero at the beginning so that the
 	#	differentiated time series has the same length
 	#	as the original time series; mainly used to 
 	#	calculate log-returns from log-prices.
 	
	# FUNCTION:
 	
	# Return Values:
 	list(t = xts$t, x = c(0, diff(xts$x)))
}


# ------------------------------------------------------------------------------


xts.cut =  
function(xts, from.date, to.date)
{	# A function implemented by D. Wuertz
		
 	# Description:
 	#	Cut a piece out of a xts time series:
 	#	Simply forward/back-extrapolate if 'from' 
 	#	and/or 'to' is out of the data range.
 	
	# Notes:
 	#	This kind of extrapolation to the start and 
 	#	end date may be not a good and final solution.
 	#	Perhaps one should also have the option to
 	#	provide a first and last xts record; e.g. for
 	#	the extraction of monthly data, the last xts
 	#	record from the previous month and the first
 	#	record from the following month.) 

 	# FUNCTION:	
 		
	# Date/time:
 	from = from.date*10000+0000
 	to = to.date*10000+2359	
	
 	# Extrapolate:
 	time = xts$t
	x = xts$x
 	if (from < time[1]){
 		time = c(from, time) 
 		x = c(x[1], x)}
 	if (to > time[length(time)]){
	 	time = c(time, to)
	 	x = c(x, x[length(x)])}	

	# Return Values:
 	list(t=time[time >= from & time <= to], x=x[time >= from & time <= to])
}


# ------------------------------------------------------------------------------
 

xts.interp = 
function(xts, deltat = 1, method = "constant")
{	# A function implemented by D. Wuertz
		
 	# Description:
 	#	Create time-steps "equidistant in physical time"
 	#	for the data records for the time range starting
	#	at "from.date" (CCYYMMDD) and ending at "to.date".
	#	The time intervals are of length "deltat" measured
	#	in minutes. 
	#	The method to be used in approximating the interpolation 
	#	is described by "method". This must be either "linear" or 
	#	"constant". "linear" results in a linear interpolation,
	#	whereas "constant" keeps the previous value (left value)
	#	within the interpolation region.	
 	 
	# Note:
 	#	ceiling(), floor(), approx(), xjulian(), xdate()

 	# FUNCTION:
 	
	# Date/time - Fill the current day:
 	from = floor(xts$t[1]/10000)*10000+0000
 	to = floor(xts$t[length(xts$t)]/10000)*10000+2359
 		
	# Out-of-Range Extrapolation:
 	time = xts$t; x = xts$x
 	if (from < time[1]) {
	 	time = c(from, time)
	 	x = c(x[1], x) }
 	if (to > time[length(time)]){ 
 		time = c(time, to)
 		x = c(x, x[length(x)]) } 	
 			
	# Convert to Julian Calender times:
 	time = xjulian(time)	
 		
	# Interpolate:
 	tapprox1 = ceiling(xjulian(from)/deltat)
 	tapprox2 = floor(xjulian(to)/deltat)
 	tapprox = deltat*(tapprox1:tapprox2)	
 	
 	# Interpolation:
 	# Collapsing to unique x values in "approx" may be likely.
 	# This results in warning messages, which we will suppress.
 	currentWarningFlag = .Options$warn
 	options(warn=-1)
 	x.prox = approx(time, x, tapprox, method = method)$y
 	options(warn=currentWarningFlag)
 		
	# Return Value:
 	list(t = xdate(tapprox), x = x.prox)
}


# ------------------------------------------------------------------------------


xts.map = 
function(xts, mean.deltat, alpha) 
{	# A function implemented by D. Wuertz
		
 	# Description:
 	#	Create a volatility adjusted time-mapping for a later 
 	#	extraction of records in weekly periodic upsilon time.
 	 
	# Notes:
 	#	"from" must start on a Monday, 
 	#	"to" must end on a Sunday!
 	#	The proper starting and ending day is not yet 
 	#	automatically be checked. See als the ToDo in
 	#	the function xts.cut().
	#   Function Calls:
 	#	matrix(), apply(), approx()
 	 
 	# FUNCTION:
 
	# Interpolate prices:
	xts = xts.cut(xts=xts, 
    from.date = floor(xts$t[1]/10000), 
    to.date = floor(xts$t[length(xts$t)])/10000)
 	epts = xts.interp(xts, deltat=1)	
 		
	# Volatilities on 1 minute time intervals:
 	volas = matrix(abs(xts.diff(xts.log(epts))$x)^alpha,
 		ncol = 10080, byrow = TRUE) 	
 			
	# Weekly mean volatilities:
 	vmean = apply(volas, 2, mean) 	
 		
	# During the week normalized cumulated volatilies:
 	cumvmean = cumsum(vmean)
 	cumvmean = 10080*cumvmean/cumvmean[length(cumvmean)]	
 		
	# Calculate time map on predefined mean.dt
 	timesteps = 10080/mean.deltat
 	tvals = mean.deltat*(1:timesteps)
 	tmap = approx(cumvmean, 1:10080, tvals, method="linear")$y 	
 		
	# Calculate all timepoints t for the whole time period 
 	# from/to:
 	time = apply(matrix(10080*(0:(nrow(volas)-1)),
 		ncol = 1, byrow = TRUE), 1, rep, timesteps)
 	time = matrix(time, ncol=1, byrow = TRUE) +
 		matrix(rep(tmap, nrow(volas)), ncol = 1, byrow = TRUE)	
 			
	# Interpolate time series for those points:
 	# xmap physical time, ymap risk-adjusted time
	tapprox = approx(1:length(epts$x), epts$x,
 		time, method = "linear")	
 			
 	# Return Value:
	list(xmap = tvals, ymap = round(tmap))
}


# ------------------------------------------------------------------------------


xts.upsilon = 
function(xts, weekly.map = seq(from = 59, by = 60, length = 168), 
method = "constant", doplot = TRUE, ...)
{	# A function implemented by D. Wuertz
	
	# Description:
	#	Interpolate data (prices, returns, etc. on a weekly.
	#	time schedule. The time schedule "weekly.map" is a 
	#	vector counting its elements in minutes from the 
	#	beginning to the end of the week. For hourly entries
	#	the length of the vector is 168. 
	#	"seq(from=59, by=60, length=168)
	#	creates such a map.
	
	# FUNCTION:
	
	# Interpolate:
	xts = xts.interp(xts=xts, deltat=1, method=method)
	xts.t = matrix(xts$t, byrow=TRUE, ncol=7*24*60)
	xts.x = matrix(xts$x, byrow=TRUE, ncol=7*24*60)
	zt = xts.t[, weekly.map[1]]
	zx = xts.x[, weekly.map[1]]
	for (i in 2:length(weekly.map)) {
		zt = cbind(zt, xts.t[, weekly.map[i]])
		zx = cbind(zx, xts.x[, weekly.map[i]])	}
	if(doplot) plot(as.vector(t(zx)), type = "l", ylab = "Prices", ...)	
		
	# Return Value:
	list(t = as.vector(t(zt)), x = as.vector(t(zx))) 
}
 

# ------------------------------------------------------------------------------
		

xts.dvs = 
function(xts, k, volatility, doplot = TRUE, ...) 
{	# A function implemented by D. Wuertz
	
 	# Description:
 	#	Create a de-volatilizised time series according
	#	to Bin Zhous dv-series algorithm. "xts" are 
	#	prices.
	
 	# Arguments:
 	#	Fortran: SUBROUTINE DVSERIES()
 	#	subroutine dv(vmax, s, ms, nt, ns, k)
	#	vmax	volatility threshold 
	#	s(nt)	original time series of log prices
 	#	ms(nt)	index
	#	nt		their lengths
	#	ns
	#	k		length of averaging interval
	
	# FUNCTION:	
	
	# Settings:
	xts = xts.log(xts)
	nt = length(xts$x)
	ns = 0
		
	# Execute Fortran Program:
	result = .Fortran("dv",
 		as.double(volatility),
 		as.double(xts$x),
		as.integer(rep(0, nt)),
 		as.integer(nt),
		as.integer(ns),
 		as.integer(k),
 		PACKAGE = "fBasics")
 		
 		
	# Select dv-Series:
	test = sum(result[[3]][result[[3]]>0])
	
	# Plot:
	if(doplot && test > 0) 
		plot(exp(xts$x[result[[3]]>0]), type="l", ylab="Prices", ...)
			
	# Return Value:
 	list(t=xts$t[result[[3]]>0], x=exp(xts$x[result[[3]]>0]))
}


# ------------------------------------------------------------------------------


xts.dwh = 
function(xts, deltat = 60, period = "weekly", dolog = TRUE, dodiff = TRUE, 
doplot = TRUE)
{ 	# A function implemented by D. Wuertz
	
	# Description:
	#	Plot intra-daily/weekly histogram of volatility. 
	#	"xts" is the data list(t,x) input , may be either a price,
	#	a logprice, or return; choose properly "dolog" and 
	#	"dodiff" flags:
	#	xts prices - dolog=TRUE dodiff=TRUE
	#	xts logprices - dolog=FALSE dodiff=TRUE
	#	xts (log)returns - dolog=FALSE dodiff=FALSE
	#	"from.date" (CCYYMMDD) and "to.date" cut out a proper
	#	part of the time series. Start on Monday, so the weekly
	#	plot also starts on Monday.
	#	"deltat" is the width of the bins in minutes. 
	#	"period" may be one of "daily", "weekly" or "both"
	
 	# FUNCTION:
	
	# Interpolate:
	xts = xts.interp(xts, deltat=deltat)
	if(dolog) xts = xts.log(xts)
	if(dodiff) xts = xts.diff(xts)
	mult = 60/deltat
	nd = 1440/deltat
	nw = 7*nd
	if(period == "daily" || period == "both") { 
 	xd = apply(matrix(abs(xts$x), byrow = TRUE, ncol = nd), 2, mean)
		xd = as.vector(matrix(c(xd, xd, rep(0, length(xd))), 
			byrow = TRUE, ncol = nd))
		td = as.vector(matrix(c(1:nd, 1:nd, 1:nd), byrow = TRUE, 
			ncol = nd))/mult
		if(doplot) plot(x = c(0,0,td,0), y = c(0,xd,0,0), type = "l", 
			xlab = "hours", ylab = "mean", main = "Daily", 
			xlim = c(0,24)) }
	if(period == "weekly" || period == "both") { 
 	xw = apply(matrix(abs(xts$x), byrow = TRUE, ncol = nw), 2, mean)
		xw = as.vector(matrix(c(xw, xw, rep(0, length(xw))), 
			byrow = TRUE, ncol = nw))
		tw = as.vector(matrix(c(1:nw, 1:nw, 1:nw), byrow = TRUE, 
			ncol = nw))/mult
		if(doplot) plot(x = c(0,0,tw,0), y = c(0,xw,0,0), type = "l",
			xlab = "hours", ylab = "mean", main = "Weekly", 
			xlim = c(0,168)) }

	# Result:
	if (period == "daily") result = list(td = td, xd = xd)
	if (period == "weekly") result = list(tw = tw, xw = xw)
	if (period == "both") result = list(td = td, xd = xd, tw = tw, xw = xw)
	
	# Return Value:	
	result
}


################################################################################




# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA 02111-1307 USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#	  iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#	  General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#	sources obtained from a few dozens of websites


################################################################################
# FUNCTION:		   		DESCRIPTION:
#  xmpfBasics            Popups the example menu
################################################################################


xmpfBasics = 
function() 
{ 	# A function implemented by Diethelm WUertz

	# Description:
	#	Popups the example menu
	
	# FUNCTION:
	
	# Popup:
	path = paste(.Library,"/fBasics", sep = "") 
	entries = read.00Index (file.path(path, "demo", "00Index"))    
	example = select.list(entries[,1])
	selected = 0
	for (i in 1:length(entries[,1])) {
		if (example == entries[i,1]) selected = i}
	if (example == "") {
    	cat("\nNo demo selected\n")}
   	else {
     	cat("\nLibrary: ", "fBasics", "\nExample: ", 
       		entries[selected,1], "\nTitle:   ", entries[selected,2], "\n")
        source(paste(path, "/demo/", example, ".R", sep = ""), 
            echo = TRUE, verbose = FALSE)}
    if (TRUE) cat("\n") 
    
    # Return Value:
    invisible()
}
 

# ******************************************************************************
# R - Modifications and Problems:


modify =
function(x, method, units) 
{
	UseMethod("modify")	
}


# ------------------------------------------------------------------------------


modify.default =
function(x, method = c("sort", "round", "trunc"), units = NULL )
{	
	# Modify:
	ans = NA
	if (method[1] == "sort") return(sort(x))
	if (method[1] == "round") return(round(x))
	if (method[1] == "trunc") return(trunc(x))
	
	# Return Value:
	ans
}	


# ------------------------------------------------------------------------------


atoms = 
function(x, ...) 
{
	UseMethod("atoms")
}


# ------------------------------------------------------------------------------


atoms.default = 
function(x, ...) 
{
	invisible(x)
}


# ------------------------------------------------------------------------------


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#	  iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#	  General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#	sources obtained from a few dozens of websites


################################################################################
# FUNCTION:		   		DESCRIPTION:
#  fbasicsDataSets		 Are located in the fBasics/data directory
################################################################################


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#	  iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#	  General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#	sources obtained from a few dozens of websites


################################################################################
# FUNCTION:		    DESCRIPTION:
#  MoFiTSData		 Data sets used for the examples in Zivot/Wang's book
################################################################################


#*******************************************************************************
# fBasics - A SOFTWARE COLLECTION FOR FINANCIAL ENGINEERS
# PART I: Markets, Basic Statistics, Date and Time Management
#
# collected by Diethelm Wuertz
# Version 0.9
#*******************************************************************************


# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General 
# Public License along with this library; if not, write to the 
# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA  02111-1307  USA

# Copyrights (C)
# for this R-port: 
#   Diethelm Wuertz <wuertz@itp.phys.ethz.ch>
# for the code accessed (or partly included) from other R-ports:
#   R: see R's copyright and license file
#   date: Terry Therneau <therneau@mayo.edu>
#     R port by Th. Lumley <thomas@biostat.washington.edu>  K. Halvorsen 
#       <khal@alumni.uv.es>, and Kurt Hornik <Kurt.Hornik@R-project.org>
#   ts: Collected by Brian Ripley. See SOURCES
#   tseries: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
# for ical:
#   libical: Libical is an Open Source implementation of the IETF's 
#     iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, 
#     and 2447). It parses iCal components and provides a C API for 
#     manipulating the component properties, parameters, and subcomponents.
#   Olsen's VTIMEZONE: These data files are released under the GNU 
#     General Public License, in keeping with the license options of 
#     libical. 
# for the holiday database:
#   holiday information collected from the internet and governmental 
#   sources obtained from a few dozens of websites  


################################################################################
 
	
# Default Parameters:
	
	xmpBasics = function(prompt = "") {invisible(prompt)}
	myFinCenter =  "Zurich"
	currentYear = as.POSIXlt(Sys.time())$year + 1900
	myUnits = "days"
	
	
.First.lib =  
function(lib, pkg)
{   # A function implemented by Diethelm Wuertz
    
    # Package:
    cat("\nfBasics:    Markets, Basic Statistics, Date and Time")
        
    # Requires:
    require(methods)
    
    # Set a timezone if none found in environment variables or options()
    # ... as suggested by Dirk Eddelbuettel, thanks Dirk.
    if (Sys.getenv("TZ") == "") {
		if (is.null(getOption("TZ"))) {
			cat("No timezone information found, using default of GMT\n")
          	Sys.putenv("TZ" = "GMT") }
       	else {
          	cat("No timezone information found, applying option() value of",
             	getOption("TZ"), "\n")
       		Sys.putenv("TZ" = getOption("TZ")) } }

    # Load dll:
    library.dynam("fBasics", pkg, lib)
}

