Actionscript Date Comparison

こ雲淡風輕ζ 提交于 2019-12-05 03:58:50
  1. Because Dates are objects (instances of a class), instead of a native data type, so they'll always be different unless it's different references to the same instance.
  2. Probably, because they get transformed to a native format (number) when compared (see type conversions). Not sure if it's being cast to a number or a string though? Be sure to test
  3. Because they're not equal; they're not the same object.
  4. The comparison you made (using getTime()) is the best thing you can use I guess.

Re: #4

You can use the ObjectUtil.dateCompare() function to get the results you are looking for.

mx.utils.ObjectUtil.dateCompare()

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!