Method: When::TM::DateAndTime#_copy
- Defined in:
- lib/when_exe/tmptypes.rb
#_copy(options = {}) ⇒ Object
属性のコピー
1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 |
# File 'lib/when_exe/tmptypes.rb', line 1143 def _copy(={}) # 夏時間の調整 case [:time] when Array if clock._need_validate if @calendar_era_props date = [:date].dup date[0] += calendar_era_epoch else date = [:date] end new_clock = clock._daylight([@frame, date, [:time]]) [:time] = [:time].map {|t| t * 1} else new_clock = clock end [:time] = @clk_time.dup._copy(.merge({:clock=>new_clock})) when nil [:time] = @clk_time.dup._copy() end return super() end |