You have a great degree of freedom in developing code for Moodle. So yes, you can use that class if you need it. It is however considered a good programming practice to extend class you plan on using because it than later gives you chance to easily add any new stuff specific to your plugin.
class myform_sample extends moodleform {
protected function definition() {
$mform = $this->_form;
$options = array(
'startyear' => 2013,
'stopyear' => 2020,
'timezone' => 99,
'optional' => false
);
$mform->addElement('date_selector', 'vreme', 'aa', $options);
$this->add_action_buttons();
}
}
class myform2 extends myform_sample {
protected function definition() {
$mform = $this->_form;
// Add custom stuff before.
parent::definition();
// Add custom stuff after.
}
}