```js
// Add a comment here to explain this section
var refDate;
if (currentDatetimeValue !== '') {
  refDate = new Date(this._currentDatetimeValue); 
} else {
  refDate = new Date();
}

second = refDate.getSeconds();
millisecond = refDate.getMilliseconds(); 
```