<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>HISTORY.rdoc</filename>
    </added>
    <added>
      <filename>LICENSE.txt</filename>
    </added>
    <added>
      <filename>dev/API/calendar_gregorian.rdoc</filename>
    </added>
    <added>
      <filename>dev/API/chronos.rdoc</filename>
    </added>
    <added>
      <filename>dev/API/datetime.rdoc</filename>
    </added>
    <added>
      <filename>dev/API/datetime_gregorian.rdoc</filename>
    </added>
    <added>
      <filename>dev/API/duration.rdoc</filename>
    </added>
    <added>
      <filename>dev/API/enumerator.rdoc</filename>
    </added>
    <added>
      <filename>dev/API/environment.rdoc</filename>
    </added>
    <added>
      <filename>dev/API/format.rdoc</filename>
    </added>
    <added>
      <filename>dev/API/integer.rdoc</filename>
    </added>
    <added>
      <filename>dev/API/interval.rdoc</filename>
    </added>
    <added>
      <filename>dev/API/unassigned.rdoc</filename>
    </added>
    <added>
      <filename>dev/info/norms_and_links.txt</filename>
    </added>
    <added>
      <filename>dev/obsolete/commercial.rb</filename>
    </added>
    <added>
      <filename>dev/obsolete/commercial.txt</filename>
    </added>
    <added>
      <filename>dev/rubyinline/year_and_day_of_year_C.rb</filename>
    </added>
    <added>
      <filename>lib/chronos/datetime/gregorian.rb</filename>
    </added>
    <added>
      <filename>rake/initialize.rb</filename>
    </added>
    <added>
      <filename>rake/lib/assesscode.rb</filename>
    </added>
    <added>
      <filename>rake/lib/bonesplitter.rb</filename>
    </added>
    <added>
      <filename>rake/lib/projectclass.rb</filename>
    </added>
    <added>
      <filename>rake/tasks/copyright.rake</filename>
    </added>
    <added>
      <filename>rake/tasks/gem.rake</filename>
    </added>
    <added>
      <filename>rake/tasks/git.rake</filename>
    </added>
    <added>
      <filename>rake/tasks/loc.rake</filename>
    </added>
    <added>
      <filename>rake/tasks/manifest.rake</filename>
    </added>
    <added>
      <filename>rake/tasks/meta.rake</filename>
    </added>
    <added>
      <filename>rake/tasks/notes.rake</filename>
    </added>
    <added>
      <filename>rake/tasks/post_load.rake</filename>
    </added>
    <added>
      <filename>rake/tasks/rdoc.rake</filename>
    </added>
    <added>
      <filename>rake/tasks/rubyforge.rake</filename>
    </added>
    <added>
      <filename>rake/tasks/spec.rake</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,41 +1,74 @@
-= README for color
-
-== Synopsis
-  require 'color'
-  red = Color::RGB.new(255,0,0) # verbose
-  red = Color.rgb(255,0,0)      # small shortcut
-
-  include Color
-  red = RGB.new(255,0,0) # include is nice
-  red = rgb(255,0,0)     # color creation methods are module functions
-
-== About
-Color is a collection of classes to deal with colors. To
-create, compare, store and manipulate them.
-
-All classes representing a color model are immutable. This is to
-simplify things. However, if you want to dynamically change things,
-there is Color::Mixer. It has accessors to all attributes in most
-color models. All attributes are mutable. That makes it ideal to
-manipulate color.
-
-== Named Colors
-At the moment, all names for named colors are taken from wikipedia.
-See links: Color names.
-
-== Developer Notes
-If some method is not documented, it is probably documented in Color::Common
-and the method in the current class is just either the native method or an optimized
-one.
-All conversion methods in Color::Common are based upon conversion to rgb and then to
-the target. That means if you want to_* methods from Color::Common, you must implement
-#to_rgb.
-
-= Links
-* Color names http://en.wikipedia.org/wiki/List_of_colors
-* Color models
-	* RGB http://en.wikipedia.org/wiki/RGB_color_model
-	* HSV http://en.wikipedia.org/wiki/HSV_color_space
-	* HSL http://en.wikipedia.org/wiki/HSL_color_space
-	* CMYK http://en.wikipedia.org/wiki/CMYK_color_model
-* Math behind transformations without color management http://www.easyrgb.com/math.html
+= Chronos
+
+
+== Indexing
+Author::           Stefan Rusterholz &lt;stefan.rusterholz+chronos at gmail.com&gt;
+Version::          0.1.0
+Website::          http://chronos.rubyforge.org/
+Git Repository::   http://github.com/apeiros/chronos
+Bugtracker::       
+Feature Requests:: 
+License::          Ruby License (see LICENSE.txt)
+
+
+== Summary
+Library to deal with Date, Time, Durations and Intervals.
+
+== Description
+Chronos is a library that lets you easily deal with various kinds of calcutations
+with dates, times, durations and intervals.
+
+
+== Installing
+=== Via RubyGems
+You need for the installation:
+* rubygems &gt;= 1.2.0
+
+You need for some of the rake tasks:
+* bacon
+* flexmock
+* git
+* hpricot
+* rcov
+* rdiscount (or markdown)
+* rdoc
+* rspec
+
+To install, do:
+
+	gem install chronos
+
+Note: you might have to use 'sudo gem install chronos'
+
+=== From Github
+You need for the installation:
+* rubygems &gt;= 1.2.0
+
+You need for some of the rake tasks:
+* bacon
+* flexmock
+* git
+* hpricot
+* rcov
+* rdiscount (or markdown)
+* rdoc
+* rspec
+
+To install, do:
+
+	curl -L -o chronos.tgz http://github.com/apeiros/chronos/tarball/master
+	tar -xfz chronos.tgz
+	cd apeiros-chronos-&lt;big number here&gt;/
+	rake gem:install
+
+Note: you might have to use 'sudo rake gem:install'
+
+
+== Examples
+
+See in the examples dir for code examples.
+
+
+== Design
+
+== Links</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -1,132 +1,31 @@
-$VERBOSE = nil
+#--
+# Copyright 2007-2008 by Stefan Rusterholz.
+# All rights reserved.
+# See LICENSE.txt for permissions.
+#++
 
-require 'rubygems'
-require 'rake'
-require 'rake/clean'
-require 'rake/testtask'
-require 'rake/packagetask'
-require 'rake/gempackagetask'
-require 'rake/rdoctask'
-require 'rake/contrib/rubyforgepublisher'
-require 'fileutils'
-require 'pp'
 
-include FileUtils
-require File.join(File.dirname(__FILE__), 'lib', 'color', 'version')
 
-RDOC_OPTS         = [
-	'--quiet',
-	'--title', 'The Color Reference',
-	'--main',  'README',
-	'--charset', 'utf-8',
-	'--inline-source',
-	'--tab-width', '2',
-	'--line-numbers',
-]
-GEM_NAME          = 'color'
-RUBYFORGE_PROJECT = 'color' # The unix name for your project
-HOMEPATH          = &quot;http://#{RUBYFORGE_PROJECT}.rubyforge.org/&quot;
-DOWNLOAD_PATH     = &quot;http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}&quot;
-NAME              = &quot;color&quot;
-PATH              = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : &quot;#{RUBYFORGE_PROJECT}/#{GEM_NAME}&quot;
-ARCHLIB           = &quot;lib/#{::Config::CONFIG['arch']}&quot;
-BIN               = &quot;*.{bundle,jar,so,obj,pdb,lib,def,exp}&quot;
-REV               = nil 
-VERS              = Color::VERSION::STRING + (REV ? &quot;.#{REV}&quot; : &quot;&quot;)
-CLEAN.include [
-	'ext/**/#{BIN}',
-	'**/.*.sw?', '**/*.o', '*.gem', '.config',
-	'**/.DS_Store', '**/._*',
-]
-PKG_FILES         =
-	%w[CHANGELOG COPYING README Rakefile] +
-  Dir.glob(&quot;{test,lib}/**/*&quot;) + 
-  Dir.glob(&quot;ext/**/*.{h,c,rb}&quot;)
+# Look in the rake/initialize.rb file for the various options that can be
+# configured in this Rakefile. The .rake files in the rake/tasks directory
+# are where the options are used.
+require 'rake/initialize'
 
-GemSpec = Gem::Specification.new do |s|
-	s.homepage          = HOMEPATH
-	s.name              = GEM_NAME
-	s.version           = VERS
+# The default task
+task :default =&gt; 'spec:run'
 
-	s.author            = &quot;Stefan Rusterholz&quot;
-	s.email             = 'apeiros@gmx.net'
 
-	s.platform          = Gem::Platform::RUBY
-	s.has_rdoc          = true
-	s.extra_rdoc_files  = %w[README CHANGELOG COPYING]
-	s.summary           = &quot;Color classes - classes to handle and manipulate colors.&quot;
-	s.description       = s.summary
-	s.files             = PKG_FILES
-	s.require_paths     = [&quot;lib/#{::Config::CONFIG['arch']}&quot;, &quot;lib&quot;]
-	s.extensions       &lt;&lt; &quot;ext/ccolor/extconf.rb&quot;
-	s.rdoc_options     += RDOC_OPTS
-end
 
-Rake::RDocTask.new do |rdoc|
-    rdoc.rdoc_dir  = 'doc/rdoc'
-    rdoc.options  += RDOC_OPTS
-    rdoc.main      = &quot;README&quot;
-    rdoc.rdoc_files.add [
-    	'README',
-    	'CHANGELOG',
-    	'COPYING',
-    	'lib/**/*.rb'
-    ]
-end
+# Project details (defaults are in rake/initialize, some cleanup is done per section in the
+# prerequisite task in each .task file, some other cleanup is done in post_load.rake)
+Project.meta.name             = 'chronos'
+Project.meta.version          = version_proc(&quot;Chronos::VERSION&quot;)
+Project.meta.website          = 'http://chronos.rubyforge.org/'
+Project.meta.bugtracker       = 'http://'
+Project.meta.feature_requests = 'http://'
+Project.meta.use_git          = true
 
-Rake::GemPackageTask.new(GemSpec) do |p|
-    p.need_tar = true
-    p.gem_spec = GemSpec
-end
+Project.manifest.ignore       = %w[web/**/*]
 
-Rake::TestTask.new do |t|
-	t.libs       &lt;&lt; &quot;test&quot;
-	t.test_files  = FileList['test/**/test_*.rb']
-	t.verbose     = true
-end
-
-desc 'Install extension and library'
-task :install =&gt; [:clean, :install_ext, :install_lib]
-
-desc 'Install extension'
-task :install_ext =&gt; :build do
-end
-
-#desc 'Build extension'
-#taks :build =&gt; EXT_SO
-
-#file EXT_SO =&gt; 'ext/ccolor/Makefile' do
-#end
-
-desc 'Release the website and new gem version'
-task :deploy =&gt; [:check_version, :website, :release] do
-  puts &quot;Remember to create SVN tag:&quot;
-  puts &quot;svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk &quot; +
-    &quot;svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} &quot;
-  puts &quot;Suggested comment:&quot;
-  puts &quot;Tagging release #{CHANGES}&quot;
-end
-
-desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
-task :local_deploy =&gt; [:website_generate, :install_gem]
-
-desc 'Install the package as a gem'
-task :install_gem =&gt; [:clean, :package] do sh &quot;sudo gem install pkg/*.gem&quot; end
-
-desc 'Generate website files'
-task :website_generate do
-  Dir['website/**/*.txt'].each do |txt|
-    sh %{ ruby scripts/txt2html #{txt} &gt; #{txt.gsub(/txt$/,'html')} }
-  end
-end
-
-desc 'Upload website files to rubyforge'
-task :website_upload do
-  host       = &quot;#{rubyforge_username}@rubyforge.org&quot;
-  remote_dir = &quot;/var/www/gforge-projects/#{PATH}/&quot;
-  local_dir  = 'website'
-  sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
-end
-
-desc 'Generate and upload website files'
-task :website =&gt; [:website_generate, :website_upload, :publish_docs]
+Project.rubyforge.project     = 'chronos'
+Project.rubyforge.path        = 'chronos'</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,21 +1,7 @@
-TODO
-================
+= BUGS
 
-* General
-	* Document ::from
-	* Implement ::floats
 
-* RGB
-	* interpolate, default value for pos (.c)
+= TODO
 
-* HSV
-	* to_rgb (.rb)
 
-* Mixer
-	* Document almost all methods, note capped vs. modulo'd
-
-* Named
-	* Document ::new
-
-* Term
-	* Document ::from, ::new, #alpha
\ No newline at end of file
+= UNHAPPY</diff>
      <filename>TODO.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,7 @@
 better method names:
 	ahead
 	comming
-	succeeding
\ No newline at end of file
+	succeeding
+	following
+	next
+</diff>
      <filename>dev/info/succeeding.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,16 @@
-module Chronos
-end
+#--
+# Copyright 2007-2008 by Stefan Rusterholz.
+# All rights reserved.
+# See LICENSE.txt for permissions.
+#++
+
+
+
+class Time; end
+class Date; end
+class DateTime &lt; Date; end
+
+
 
 require 'chronos/datetime'
 require 'chronos/duration'
@@ -7,5 +18,30 @@ require 'chronos/exceptions'
 require 'chronos/interval'
 require 'chronos/zone'
 
-# run test suite
-load(File.dirname(__FILE__)+&quot;/../test/tc_&quot;+File.basename(__FILE__)) if __FILE__ == $0
+
+
+module Chronos
+	class &lt;&lt;self
+		attr_reader :language
+		attr_reader :timezone
+		
+		def normalize_language(val)
+			raise ArgumentError, &quot;Invalid language #{val.inspect}&quot; unless lang = val[/^[a-z]{2}_[A-Z]{2}/]
+		end
+		
+		def normalize_timezone(val)
+			val.upcase
+		end
+		
+		def language=(value)
+			@language = normalize_language(value).dup.freeze
+		end
+
+		def timezone=(value)
+			@language = normalize_language(value).dup.freeze
+		end
+	end
+
+	self.language = ENV['LANG'] || 'en_US'
+	self.timezone = Time.now.strftime(&quot;%Z&quot;)
+end</diff>
      <filename>lib/chronos.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,17 @@
-# day 536870912 = 2000-01-01, that leaves us another 1.4mio years with Fixnum
-# italian calendar reform: 536718529 (536870912-152383, 1582-10-15)
+#--
+# Copyright 2007-2008 by Stefan Rusterholz.
+# All rights reserved.
+# See LICENSE.txt for permissions.
+#++
+
 
-# years that start with thursday have 53 weeks
-# leap years that start with wednesday have 53 weeks
-# commercial years start always on mondays
 
 require 'chronos'
 
+
+
 module Chronos
+
 	# Example:
 	#   require 'chronos/gregorian'
 	#   date = Datetime.civil(year, month, day)
@@ -16,66 +20,25 @@ module Chronos
 	#   dtz = Datetime.civil(y, m, d).at(hour, min, sec).in(&quot;Europe/Zurich&quot;, &quot;de-de&quot;)
 	#   datetime = Datetime.ordinal(year, day_of_year).at(0,0).in(&quot;UTC+1&quot;, &quot;en-us&quot;)
 	class Datetime
-		include Comparable
-
-		# FIXME (remove all the unless defined? after irb testing)
-		DAYS_IN_MONTH1    = [0,31,28,31,30,31,30,31,31,30,31,30,31] unless defined? DAYS_IN_MONTH1
-		DAYS_IN_MONTH2    = [0,31,29,31,30,31,30,31,31,30,31,30,31] unless defined? DAYS_IN_MONTH2
-		DAYS_UNTIL_MONTH1 = [0,31,59,90,120,151,181,212,243,273,304,334,365] unless defined? DAYS_UNTIL_MONTH1
-		DAYS_UNTIL_MONTH2 = [0,31,60,91,121,152,182,213,244,274,305,335,366] unless defined? DAYS_UNTIL_MONTH2
-		# symbol =&gt; index (reverse map for succ/current/previous)
-		DAY_OF_WEEK = {
-			:monday     =&gt; 0,
-			:tuesday    =&gt; 1,
-			:wednesday  =&gt; 2,
-			:thursday   =&gt; 3,
-			:friday     =&gt; 4,
-			:saturday   =&gt; 5,
-			:sunday     =&gt; 6,
-		} unless defined? DAY_OF_WEEK
-		# 0 = monday
-		DAY_NAME         = %w(
-			Monday
-			Tuesday
-			Wednesday
-			Thursday
-			Friday
-			Saturday
-			Sunday
-		) unless defined? DAY_NAME
-		MONTH_NAME         = %w(
-			January
-			February
-			March
-			April
-			May
-			June
-			July
-			August
-			September
-			October
-			November
-			December
-		) unless defined? MONTH_NAME
-
-		# returns whether or not given year is a leapyear
-		def self.leap?(year)
-			((year%4).zero? &amp;&amp; !(year%100).zero?) || (year%400).zero?
-		end
-		
-		# returns the number of days in a given month for a given year
-		def self.days_in_month(month, year=nil)
-			if month == 2 &amp;&amp; year &amp;&amp; leap?(year) then
-				29
-			else
-				DAYS_IN_MONTH1[month]
+		# Convert a Date, DateTime or Time to Chronos::Datetime object
+		def self.import(obj, timezone=nil, language=nil)
+			case obj
+				when ::Time
+					time  = utc
+					value = Chronos::Datetime.civil(time.year, time.month, time.day).
+																		at(time.hour, time.min, time.sec, time.to_f%1)
+					(timezone || language) ? value.in(timezone, language) : value
+				when ::Date
+				when ::DateTime
 			end
 		end
 
+		include Comparable
+
 		# create a datetime with date and time part set to the current system time
 		# and date
 		def self.now(timezone=nil, language=nil)
-			Time.now.to_datetime(timezone, language)
+			Datetime.import(Time.now, timezone, language)
 		end
 
 		# create a datetime with only the date part set to the current system date
@@ -86,52 +49,6 @@ module Chronos
 			ordinal(now.year, now.yday)
 		end
 
-		# create a datetime with date part only from year, month and day_of_month
-		#&#160;for timezone/language append a .in(timezone, language) or set a global
-		# (see Chronos::Datetime)
-		def self.civil(year, month, day_of_month)
-			# calculate how many days passed until this year
-			leap  = leap?(year)
-			raise ArgumentError, &quot;Invalid month (#{year}-#{month}-#{day_of_month})&quot; if month &lt; 1 or month &gt; 12
-			raise ArgumentError, &quot;Invalid day of month (#{year}-#{month}-#{day_of_month})&quot; if day_of_month &gt; (leap ? DAYS_IN_MONTH2 : DAYS_IN_MONTH1)[month]
-			year  = year.to_f
-			leaps = (year/4.0).ceil-(year/100.0).ceil+(year/400.0).ceil
-			doy   = (leap ? DAYS_UNTIL_MONTH2 : DAYS_UNTIL_MONTH1)[month-1]+day_of_month
-			new(year*365+leaps+doy, nil, nil)
-		end
-
-		# see Datetime#format
-		#&#160;for timezone/language append a .in(timezone, language) or set a global
-		# (see Chronos::Datetime)
-		def self.commercial(year, week, day_of_week, year_is_commercial=true)
-			fdy = year*365+(year/4.0).ceil-(year/100.0).ceil+(year/400.0).ceil+1
-			if year_is_commercial then
-				fwd = (fdy+4)%7
-				off = (10-fwd)%7-3
-				new(fdy+off+(week-1)*7+day_of_week, nil, nil)
-			else
-				#fwd = (fdy+4)%7 # first day of years weekday
-				#off = (10-fwd)%7-3   # calculate offset of the first week
-				#new(fdy+off+week*7+day_of_week, nil, nil)
-			end
-		end
-
-		# create a datetime with date part only from year and day_of_year
-		#&#160;for timezone/language append a .in(timezone, language) or set a global
-		# (see Chronos::Datetime)
-		def self.ordinal(year, day_of_year)
-			leaps = (year/4.0).ceil-(year/100.0).ceil+(year/400.0).ceil
-			new(year*365+leaps+day_of_year, nil, nil)
-		end
-
-		# create a datetime with time part only from hour, minute, second,
-		# fraction of second (alternatively you can use a float as second)
-		#&#160;for timezone/language append a .in(timezone, language) or set a global
-		# (see Chronos::Datetime)
-		def self.time(hour, minute=0, second=0, fraction=0.0, timezone=nil, language=nil)
-			new(nil,hour*3600+minute*60+second+fraction, timezone=nil, language=nil)
-		end
-
 		# create a datetime with date and time part from a unix-epoch-stamp
 		#&#160;for timezone/language append a .in(timezone, language) or set a global
 		# (see Chronos::Datetime)
@@ -146,7 +63,11 @@ module Chronos
 		# this is in here too to be consistent with Datetime#to_s, for other parsers
 		# see Chronos::Parse
 		def self.iso_8601(string)
-			components(Parse.iso_8601(string))
+			raise NoMethodError
+		end
+		
+		def self.xml_schema(string)
+			raise NoMethodError
 		end
 		
 		# from a hash with components, mainly intended for parsers
@@ -626,105 +547,6 @@ module Chronos
 				Time.local(*items)
 			end
 		end
-
-		# format(string, language, timezone)
-		# format datetime, similar to strftime. Format strings can contain:
-		#   %a: monthname, can be formatted like %s in sprintf
-		#   %b: dayname, can be formatted like %s in sprintf
-		#   %y: year, 4 digits (0000..9999)
-		#       %-2y: last 2 digits
-		#       %2y:  first 2 digits
-		#   %m: month of year, 1..31, can be formatted as %d in sprintf
-		#   %d: day of month, 1..31, can be formatted as %d in sprintf
-		#   %j: day of year, 1..366, can be formatted as %d in sprintf
-		#   %k: day of week, 0=monday, 6=sunday
-		#       %+k: 1..7 (changes range from 0..6 to 1..7)
-		#       %2k: 0=saturday, 2=monday, 6=friday
-		#       %+2k: 1=saturday, 3=monday, 7=friday
-		#   %w: week of year (iso 8601) 1..53, can be formatted as %d in sprintf
-		#
-		#   %H: hour of day, 0..23, can be formatted as %d in sprintf
-		#   %I: hour of day, 1..12, can be formatted as %d in sprintf
-		#   %M: minute of hour 0..59, can be formatted as %d in sprintf
-		#   %S: second of minute, 0..59, can be formatted as %d in sprintf
-		#   %O: offset in format &#177;HHMM
-		#   %Z: timezone
-		#   %P: meridian indicator (AM/PM)
-		#
-		#   %%: Literal % character
-		def format(string=nil, language=nil)
-			unless string
-				if !@day_number then
-					string = &quot;%02H:%02M:%02S&quot;
-				elsif !@second_number then
-					string = &quot;%04y-%02m-%02d&quot;
-				else
-					string = &quot;%04y-%02m-%02d %02H:%02M:%02S&quot;
-				end
-			end
-
-			string.gsub(/%(%|\{[^}]\}|.*?[A-Za-z])/) { |m|
-				case m[-1,1]
-					when '{'
-						call,*args = *m[2..-2].split(&quot;,&quot;)
-						call       = c.to_sym
-						args.map! { |arg|
-							if arg[0,1] == &quot;:&quot; then
-								arg[1..-1].to_sym
-							elsif arg =~ /\A\d+\z/ then
-								Integer(arg)
-							else
-								Float(arg)
-							end
-						}
-
-						respond_to?(call)
-						send(call, *args)
-					when 'a'
-						&quot;#{m[0..-2]}s&quot;%month_name
-					when 'b'
-						&quot;#{m[0..-2]}s&quot;%day_name
-					when 'y'
-						s = &quot;%04d&quot;%year
-						if m.length &gt; 2 then
-							o = m[1..-2].to_i
-							o &gt; 0 ? s[0,o] : s[o..-1]
-						else
-							s
-						end
-					when 'm'
-						&quot;#{m[0..-2]}d&quot;%month
-					when 'd'
-						&quot;#{m[0..-2]}d&quot;%day_of_month
-					when 'j'
-						&quot;#{m[0..-2]}d&quot;%day_of_year
-					when 'k'
-						dow = day_of_week
-						dow = (dow+m[-2,1].to_i)%7 if (m[-2,1] =~ /\d/)
-						dow += 1 if (m[1,1] == &quot;+&quot;)
-						dow
-					when 'w'
-						&quot;#{m[0..-2]}d&quot;%week
-
-					when 'H'
-						&quot;#{m[0..-2]}d&quot;%hour
-					when 'I'
-						&quot;#{m[0..-2]}d&quot;%(hour%12+1)
-					when 'M'
-						&quot;#{m[0..-2]}d&quot;%minute
-					when 'S'
-						&quot;#{m[0..-2]}d&quot;%second
-					when 'O'
-						&quot;%s%02d%02d&quot;%[@offset &lt; 0 ? &quot;-&quot; : &quot;+&quot;,@offset.div(3600),@offset.div(60)%60]
-					when 'Z'
-						&quot;FIXME&quot;
-					when 'P'
-						hour &lt;= 12 ? &quot;AM&quot; : &quot;PM&quot;
-					when '%'
-						&quot;%&quot;
-				end
-			}
-		end
 		
 		# prints the datetime as ISO-8601, examples:
 		# datetime: 2007-01-31T14:31:25-04:00
@@ -753,16 +575,3 @@ module Chronos
 		end
 	end
 end
-
-class Time
-	# convert to Chronos::Datetime object in given timezone and language
-	# current Time objects timezone is respected
-	def to_datetime(timezone=nil, language=nil)
-		time  = utc
-		value = Chronos::Datetime.civil(time.year, time.month, time.day).
-		                          at(time.hour, time.min, time.sec, time.to_f%1)
-		(timezone || language) ? value.in(timezone, language) : value
-	end
-end
-
-load(File.dirname(__FILE__)+&quot;/../../test/chronos/tc_&quot;+File.basename(__FILE__)) if __FILE__ == $0</diff>
      <filename>lib/chronos/datetime.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,17 @@
+#--
+# Copyright 2007-2008 by Stefan Rusterholz.
+# All rights reserved.
+# See LICENSE.txt for permissions.
+#++
+
+
+
+require 'chronos'
+
+
+
 module Chronos
+
 	# An immutable class representing a &quot;floating&quot; (independant of
 	# a start or end) period.
 	# A Durations months-count becomes determinated by adding it to or
@@ -203,4 +216,4 @@ module Chronos
 			end
 		end
 	end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/chronos/duration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,28 +1,42 @@
+#--
+# Copyright 2007-2008 by Stefan Rusterholz.
+# All rights reserved.
+# See LICENSE.txt for permissions.
+#++
+
+
+
+require 'chronos'
 require 'enumerator'
+
+
+
 class Duration
-ToTextEn = {
--(1/0.0) =&gt; proc { |s| sprintf &quot;%d weeks ago&quot;, -s.div(604800) },
--1209600 =&gt; proc { |s| &quot;one week ago&quot; },
--604800 =&gt; proc { |s| sprintf &quot;%d days ago&quot;, -s.div(86500) },
--172800 =&gt; proc { |s| &quot;yesterday&quot; },
-0 =&gt; proc { |s| &quot;today&quot; },
-86400 =&gt; proc { |s| &quot;tomorrow&quot; },
-172800 =&gt; proc { |s| sprintf &quot;in %d days&quot;, (s/86400).ceil },
-604800 =&gt; proc { |s| &quot;in one week&quot; },
-1209600 =&gt; proc { |s| sprintf &quot;in %d weeks&quot;, (s/604800).ceil },
-}.to_a.sort
-def initialize(seconds, months=0)
-@seconds = seconds
-@months  = months
-end
+	ToTextEn = {
+		-(1/0.0) =&gt; proc { |s| sprintf &quot;%d weeks ago&quot;, -s.div(604800) },
+		-1209600 =&gt; proc { |s| &quot;one week ago&quot; },
+		-604800 =&gt; proc { |s| sprintf &quot;%d days ago&quot;, -s.div(86500) },
+		-172800 =&gt; proc { |s| &quot;yesterday&quot; },
+		0 =&gt; proc { |s| &quot;today&quot; },
+		86400 =&gt; proc { |s| &quot;tomorrow&quot; },
+		172800 =&gt; proc { |s| sprintf &quot;in %d days&quot;, (s/86400).ceil },
+		604800 =&gt; proc { |s| &quot;in one week&quot; },
+		1209600 =&gt; proc { |s| sprintf &quot;in %d weeks&quot;, (s/604800).ceil },
+	}.to_a.sort
 
-def to_text
-ToTextEn.each_cons(2) { |(v,t), (v2,t2)|
-return t.call(@seconds) if @seconds &gt;= v &amp;&amp; @seconds &lt; v2
-}
-ToTextEn.last.last.call(@seconds)
-end
-alias to_s to_text
+	def initialize(seconds, months=0)
+		@seconds = seconds
+		@months  = months
+	end
+	
+	def to_text
+		ToTextEn.each_cons(2) { |(v,t), (v2,t2)|
+			return t.call(@seconds) if @seconds &gt;= v &amp;&amp; @seconds &lt; v2
+		}
+		ToTextEn.last.last.call(@seconds)
+	end
+	alias to_s to_text
 end
+
 time = Time.today-2*7*24*3600
 30.times { puts &quot;#{time.strftime('%Y-%m-%d')}: #{Duration.new(time-Time.today)}&quot;; time+=86400 }</diff>
      <filename>lib/chronos/durationtotext.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,16 @@
+#--
+# Copyright 2007-2008 by Stefan Rusterholz.
+# All rights reserved.
+# See LICENSE.txt for permissions.
+#++
+
+
+
+require 'chronos'
+
+
+
 module Chronos
-	class NoDatePart &lt; RuntimeError; end
-	class NoTimePart &lt; RuntimeError; end
-end
\ No newline at end of file
+	class NoDatePart &lt; StandardError; end
+	class NoTimePart &lt; StandardError; end
+end</diff>
      <filename>lib/chronos/exceptions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,13 @@
+#--
+# Copyright 2007-2008 by Stefan Rusterholz.
+# All rights reserved.
+# See LICENSE.txt for permissions.
+#++
+
+
+
 module Chronos
+
 	# An Interval is determinated by a start and an end Datetime.
 	# Unlike in Duration, this allows to determine the months part exactly in
 	# seconds (and therefore minutes, hours, days, weeks).
@@ -210,4 +219,4 @@ module Chronos
 			&quot;&lt;Interval #{@begin} - #{@end}, @months=#{@months}, @seconds=#{@seconds}&gt;&quot;
 		end
 	end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/chronos/interval.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,37 @@
+#--
+# Copyright 2007-2008 by Stefan Rusterholz.
+# All rights reserved.
+# See LICENSE.txt for permissions.
+#++
+
+
+
 require 'chronos/datetime'
+
+
+
+
 module Chronos
-  class Datetime
-    # for the minimalistic :-p
-    alias y year
-    alias m month
-    alias d day_of_month
-    alias H hour
-    alias M minute
-    alias S s
-  end
+	module Datetime
+		module Gregorian
+
+			# require 'chronos/minimalistic' for 'y' method.
+			alias y year
+
+			# require 'chronos/minimalistic' for 'm' method.
+			alias m month
+
+			# require 'chronos/minimalistic' for 'd' method.
+			alias d day_of_month
+
+			# require 'chronos/minimalistic' for 'H' method.
+			alias H hour
+
+			# require 'chronos/minimalistic' for 'M' method.
+			alias M minute
+
+			# require 'chronos/minimalistic' for 'S' method.
+			alias S s
+		end
+	end
 end</diff>
      <filename>lib/chronos/minimalistic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,11 @@
+#--
+# Copyright 2007-2008 by Stefan Rusterholz.
+# All rights reserved.
+# See LICENSE.txt for permissions.
+#++
+
+
+
 module Chronos
 	Zone = Struct.new(
 		:timezone_id,</diff>
      <filename>lib/chronos/zone.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>93d2b58623ae59b3eac6fef530dba2069be35424</id>
    </parent>
  </parents>
  <author>
    <name>Stefan Rusterholz</name>
    <email>stefan@bayarmaa-nyamsurens-macbook.local</email>
  </author>
  <url>http://github.com/apeiros/chronos/commit/8f0ff47ed6d76aeb1a8e6bbc7318239f63c9b3c7</url>
  <id>8f0ff47ed6d76aeb1a8e6bbc7318239f63c9b3c7</id>
  <committed-date>2008-07-15T09:06:12-07:00</committed-date>
  <authored-date>2008-07-15T09:06:12-07:00</authored-date>
  <message>cleanup</message>
  <tree>ba48b79e9d9aa960d55fd25adb61f0b738e0b0d0</tree>
  <committer>
    <name>Stefan Rusterholz</name>
    <email>stefan@bayarmaa-nyamsurens-macbook.local</email>
  </committer>
</commit>
