Quantcast
Channel: stoimen's web log » flex 3
Viewing all articles
Browse latest Browse all 10

Flex 3: compare two dates

$
0
0

Theory of Operation

You’re using Flex 3 and want to compare two dates. The format of the dates is string something like “2009 May 05″. The question is …

What’s the best way to compare them

Well if you’ve the dates as strings and you can easily conver them to something like unix timestamps. If they are a Date object you can try lik so:

date1 = new Date(’2009′);

date2 = new Date(’1990′);

if (date1.setTime() < date2.setTime())

Related posts:

  1. Zend_Date with dates before 1901
  2. Flex 3 DateChooser UTC issue
  3. Download Custom Flex 3 DateChooser
  4. Flex 3 Custom Preloader

Viewing all articles
Browse latest Browse all 10

Trending Articles