Proper way to check for null dates in Flex/Actionscript? -
when working date()
objects in flex/actionscript, i'm using following function check null dates. proper way check null date or there better alternative out there?
public function isdatenull(date:date):boolean { if (date && date.fullyear != 0) { return true; } return false; }
since date class extends object , isn't primitive type doesn't have default value , therefore should null if hasn't yet been instantiated. date being populated sort of database mapping or along lines? otherwise not just
if(!date)
or
if(date==null)
no need have function this. datefield.selecteddate value should null if no date has been selected yet. wasn't posted answer because don't entirely understand issue being encountered sounds though there's variety of cases though. depending on service layer , underlying jdbc (or other connector) db , type of db , datatype values can vary. in general date null until memory acquired through call constructor though.
thanks, shaun
Comments
Post a Comment