Sha256: 6478ce78292a8ee713ddecee9737b4e001211e70ce751eda2a4d3533211ada99

Contents?: true

Size: 1.3 KB

Versions: 8

Compression:

Stored size: 1.3 KB

Contents

# dates.rb: a Type to deal with dates
# Copyright (C) 2006, 2009 Vincent Fourmond
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA

require 'time'
require 'ctioga2/utils'

module CTioga2
  Version::register_svn_info('$Revision: 2 $', '$Date: 2009-04-25 14:03:30 +0200 (Sat, 25 Apr 2009) $')

  module MetaBuilder

    # The module Types should be used for all subclasses of Type, to
    # keep the place clean and tidy.
    module Types

      # A combination date/time
      class DateTimeParameter < Type

        type_name :date_time, 'date', Time.new

        def string_to_type_internal(str)
          return Time.parse(str)
        end

      end
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ctioga2-0.7 lib/ctioga2/metabuilder/types/dates.rb
ctioga2-0.6.1 lib/ctioga2/metabuilder/types/dates.rb
ctioga2-0.6 lib/ctioga2/metabuilder/types/dates.rb
ctioga2-0.5 lib/ctioga2/metabuilder/types/dates.rb
ctioga2-0.4 lib/ctioga2/metabuilder/types/dates.rb
ctioga2-0.2 lib/ctioga2/metabuilder/types/dates.rb
ctioga2-0.1 lib/ctioga2/metabuilder/types/dates.rb
ctioga2-0.0 lib/ctioga2/metabuilder/types/dates.rb