Sha256: 4e6401fdfb70a987eb2da0f8c5a4ac8f0e5b15a8291d114b077cdffa4a9c7e18
Contents?: true
Size: 420 Bytes
Versions: 1
Compression:
Stored size: 420 Bytes
Contents
# coding: utf-8 require "rubygems" require "kagemusha/date" p Date.today.strftime("%Y-%m-%d") #=> today # Normal Style. musha = Kagemusha::Date.on(2007, 1, 1) musha.swap { p Date.today.strftime("%Y-%m-%d") #=> 2007-01-01 } p Date.today.strftime("%Y-%m-%d") #=> today # Block Style. Kagemusha::Date.on(2007, 1, 1) { p Date.today.strftime("%Y-%m-%d") #=> 2007-01-01 } p Date.today.strftime("%Y-%m-%d") #=> today
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nayutaya-kagemusha-0.1.0 | examples/date.rb |