(input, model)
| 3117 | |
| 3118 | // Return a moment from input, that is local/utc/zone equivalent to model. |
| 3119 | function cloneWithOffset(input, model) { |
| 3120 | var res, diff; |
| 3121 | if (model._isUTC) { |
| 3122 | res = model.clone(); |
| 3123 | diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res); |
| 3124 | // Use low-level api, because this fn is low-level api. |
| 3125 | res._d.setTime(+res._d + diff); |
| 3126 | utils_hooks__hooks.updateOffset(res, false); |
| 3127 | return res; |
| 3128 | } else { |
| 3129 | return local__createLocal(input).local(); |
| 3130 | } |
| 3131 | } |
| 3132 | |
| 3133 | function getDateOffset (m) { |
| 3134 | // On Firefox.24 Date#getTimezoneOffset returns a floating point. |
no test coverage detected