Sha256: 42f76e215483a7f652f5c4f5e14bf6e10295edd478a90a007ca764c8275088c2
Contents?: true
Size: 578 Bytes
Versions: 18
Compression:
Stored size: 578 Bytes
Contents
#-- # Author:: Tyler Rick # Copyright:: Copyright (c) 2007 QualitySmith, Inc. # License:: Ruby License # Submit to Facets?:: Yes. #++ require 'date' require 'rubygems' require 'facets/core/date/to_time' class Date def iso8601 # Useful for SQL dates, among other things to_time().iso8601()[0..9] end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test class TheTest < Test::Unit::TestCase def test_iso8601 assert_equal '2006-07-18', Date.civil(2006, 7, 18).iso8601() end end =end
Version data entries
18 entries across 18 versions & 2 rubygems