| 14158 | } |
| 14159 | |
| 14160 | function parse(scale, input) { |
| 14161 | if (helpers$1.isNullOrUndef(input)) { |
| 14162 | return null; |
| 14163 | } |
| 14164 | |
| 14165 | var options = scale.options.time; |
| 14166 | var value = toTimestamp(scale, scale.getRightValue(input)); |
| 14167 | if (value === null) { |
| 14168 | return value; |
| 14169 | } |
| 14170 | |
| 14171 | if (options.round) { |
| 14172 | value = +scale._adapter.startOf(value, options.round); |
| 14173 | } |
| 14174 | |
| 14175 | return value; |
| 14176 | } |
| 14177 | |
| 14178 | /** |
| 14179 | * Figures out what unit results in an appropriate number of auto-generated ticks |